2012-05-31 2 views
1

버튼을 클릭하면 handler.toggleCreatingTheme()가 호출되었지만 outputPanel이 렌더링되지 않습니다. 페이지 (f5)를 새로 고침하면 패널의 내용이 표시됩니다.a4j commandButton의 렌더링이 작동하지 않습니다. 페이지 렌더링하지 않습니다

   <a4j:commandButton styleClass="simple-submit-button" 
        action="#{handler.toggleCreatingTheme()}" 
        rendered="#{!handler.creatingTheme}" 
        value="txt" 
        immediate="true" 
        render="newThemeForm" oncomplete="initEditor()" status="statusWait" /> 

       <a4j:outputPanel id="newThemeForm" ajaxRendered="true" rendered="#{handler.creatingTheme}"> 

이 태그는 모두 h : 양식 태그에 있습니다. 단 하나의 h : 양식 만 있습니다.

어떻게 페이지를 새로 고쳐서 버튼을 클릭 할 때 패널을 렌더링 할 수 있습니까?

답변

1

다른 A4J 내에 삽입 newThemeForm : 여전히 false 될 것 rendered 속성의로 렌더링 할 때 newThemeForm가 DOM에 수 없기 때문에 outputPanel 대신 다시 렌더링 newThemeForm .This의 그것을 렌더링입니다. 처럼 :

<a4j:outputPanel id="outerPanel> 
<a4j:outputPanel id="newThemeForm" rendered="#{bean.booleanvalue}"> 
</a4j:outputPanel> 
</a4j:outputPanel> 

outerPanel 아닌 newThemeForm을 렌더링합니다.

0

은 내가 AhamedMustafaM 언급하는 방식을 시도했지만 그것은 나와 함께 일을 didnt는, 그래서 내가 검색 그래서 결국 내가 그것을 해결과 함께 작동하도록 얻었다 동안 약간의 재판을, 어떻게 여기

<a4j:commandButton id="clear" value="Clear" action="#{handler.clearData}" immediate="true" > 
    <!-- dummy call just to make it work --> 
    <a4j:actionListener listener="#{ViewerController.test}"/> 
    <f:ajax render="dataGroupPanel"/> 
</a4j:commandButton> 
입니다
관련 문제