问题
I am new to Richfaces4 and JSF2 and having lots of issues. Same code start to work suddenly and then it breaks. Currently I have a ui:include tag that update the page when the a4j:commandLink is clicked. Using debugging feature of eclipse I can see that the methods are being called and correct value is stored in the bean but page never gets updated until I click on it the second time. It seems the page is updated before the values are set in the backing bean. Following is my code. The same thing was working in MyFaces 2.0.2 before I updated to MyFaces 2.1.3.
<a4j:outputPanel id="pagePanel" layout="block">
<ui:include src="#{panelMenu.currentPage}"></ui:include>
</a4j:outputPanel>
<h:panelGrid>
<p><a4j:commandLink value="View Member" render="pagePanel" execute="pagePanel">
<a4j:param value="/pages/group_member.xhtml" assignTo="#{panelMenu.currentPage}"/>
</a4j:commandLink></p>
<p><a4j:commandLink value="View/Edit Groups" render="pagePanel" execute="pagePanel">
<a4j:param value="/pages/group_detail.xhtml" assignTo="#{panelMenu.currentPage}"/>
</a4j:commandLink></p>
</h:panelGrid>
来源:https://stackoverflow.com/questions/7780162/uiinclude-in-richfaces-4-only-gets-updated-on-second-click