몇 가지 JSF 종속성이 없다는 것이 밝혀졌습니다. jsf-api.jar
그리고 jsf-impl.jar
. 그 후 그것은 잘못된 버전 인 내 컨테이너 (WebSphere)에서 제공 한 것을 가져 갔기 때문에 작동하지 않습니다. 이러한 종속성 항아리와 올바른 버전을 적용하면 모두 좋았습니다!
이음새 구성 요소를 생성 할 수 없으며 페이지 범위가 활성화되지 않습니다. SelectBooleanCheckbox
문제
이음새 2.2.2, JSF 1.2. 너무 간단하게 들립니다 : a dataTable
각 행에 일부 버튼이 호출 될 때 관찰하려는 확인란이있는 경우. 컨트롤러가 있습니다.
@Name("MyController")
@Scope(ScopeType.PAGE)
public class MyController {
private List<MyItem> myItems;
public MyItem[] getItemsList(boolean excluded) {
return myItems;
}
나는 이것 가지다 MyItem
유형:
public class MyItem {
private boolean selected = false;
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
System.out.println("setting to " + selected);
this.selected = selected;
}
... other things ...
}
이것은 내 xhtml입니다 :
<a:form id="formExcludedList">
<rich:dataTable id="excludeList"
value="#{MyController.getItemsList(true)}" var="o">
<rich:column>
<h:selectBooleanCheckbox id="selectComponent"
value="#{o.selected}" />
</rich:column>
확인란을 클릭 할 때 MyItem.setSelected
실행되지 않습니다. 그래도 펑키 로깅을 받고 있습니다 : (간결함을 위해 손질)
DEBUG createHotDeployment - Using Java hot deploy
DEBUG beginRequest - >>> Begin JSF request for <my page>
DEBUG begin - beginning transaction prior to phase: RESTORE_VIEW(1)
DEBUG begin - beginning JTA transaction
WARN getInstance - Cannot create Seam component, scope is not active: MyController(PAGE)
WARN getInstance - Cannot create Seam component, scope is not active: MyController(PAGE)
WARN getInstance - Cannot create Seam component, scope is not active: MyController(PAGE)
WARN getInstance - Cannot create Seam component, scope is not active: MyController(PAGE)
DEBUG restoreAndLockConversation - No stored conversation
DEBUG commitOrRollback - committing transaction after phase: INVOKE_APPLICATION(5)
DEBUG commit - committing JTA transaction
DEBUG begin - beginning transaction prior to phase: RENDER_RESPONSE(6)
DEBUG begin - beginning JTA transaction
DEBUG commitOrRollback - committing transaction after phase: RENDER_RESPONSE(6)
DEBUG commit - committing JTA transaction
DEBUG endRequest - Discarding conversation state: 7
DEBUG endRequest - After render response, destroying contexts
DEBUG flushAndDestroyContexts - ... et cetera
DEBUG destroy - destroying: ...
DEBUG destroy - destroying: ... et cetera
DEBUG endRequest - <<< End JSF request for <my page>
당신의 도움은 대단히 감사합니다!
해결책
다른 팁
Jboss는이 오류를 찾을 수 없다면이 오류를 던질 수 있습니다. seam.properties
응용 프로그램에서 src/conf
예배 규칙서. 파일은 비어있을 수 있지만 범위가 활성화 되려면 거기에 있어야합니다.
제휴하지 않습니다 StackOverflow