JSF2: Form ajax action makes another form's view state to be lost
问题 I have a simple page consisting of two forms. They cannot be displayed simultaneously (one toggles the other). Here is the code: <h:body> <ui:composition template="/elements/templateWithMenu.xhtml"> <ui:define name="content"> <p:dialog id="question1DialogId" widgetVar="question1Dialog" resizable="false" closable="false" visible="true"> <h:panelGroup id="questionStep1Group"> <h:form id="questionStep1Form" rendered="#{newPoll2.displayQuestionStep1}"> <h:commandLink value="next" action="#