Facing issue with a4j:keepAlive
mitesh Jun 14, 2007 8:47 PMHi all..
I am facing "View state can not be restore" popup error when i click on radio button when i use following code.
Following code shows one radio button and two text boxes in one panelGrid.
Behaviour I want is like when i click on YES then it will not show the text boxes (or PanelGrid) and when i click on NO then it will.
I use IntakeHeaderBean as KeepAlive shown in following code. If I remove IntakeHeaderBean from keepAlive then It is not showing error and working properly. But then new problem i am facing is when i clicked on radio it instanciate bean again and calles the constructor. (which i dont want to do).
<a4j:region rendered="true" renderRegionOnly="true" immediate="true"> <a4j:outputPanel ajaxRendered="true" layout="none" rendered="true"> <a4j:keepAlive beanName="clientLOBBean"></a4j:keepAlive> <a4j:keepAlive beanName="intakeHeaderBean"></a4j:keepAlive> . : : <h:panelGrid columns="2"> <h:outputText styleClass="FormTitle" value="#{intakeHeaderBean.columnNames['PERSON_COMPLETING_FORM_FLAG']}" /> <a4j:region immediate="true" renderRegionOnly="true" rendered="true"> <a4j:outputPanel ajaxRendered="true" rendered="true"> <h:panelGroup id="PersonCompletingFormPanelGroup"> <h:selectOneRadio layout="lineDirection" immediate="true" styleClass="FrmNormalType" value="#{intakeHeaderBean.personCompletingFormFlag}" valueChangeListener="#{intakeHeaderBean.personCompletingFormRadioListener}"> <f:selectItem itemLabel="Yes" itemValue="Y" /> <f:selectItem itemLabel="No" itemValue="N" /> <a4j:support event="onclick" immediate="true" reRender="personCompletingPanelGrid"> </a4j:support> </h:selectOneRadio> <a4j:outputPanel layout="none"> <h:panelGrid columns="2" id="personCompletingPanelGrid" rendered="#{!intakeHeaderBean.personCompletingFormFlagBoolean}"> <h:outputText styleClass="FrmResultsType" value="If No: " /> <h:outputText value="" /> <h:outputText styleClass="FrmResultsType" value="#{intakeHeaderBean.columnNames['PERSON_RELATIONSHIP']}" /> <h:inputText styleClass="FrmNormalType" value="#{intakeHeaderBean.personRelationship}" required="#{!intakeHeaderBean.personCompletingFormFlagBoolean}" /> <h:outputText styleClass="FrmResultsType" value="#{intakeHeaderBean.columnNames['PERSON_FULL_NAME']}" /> <h:inputText styleClass="FrmNormalType" value="#{intakeHeaderBean.personFullName}" required="#{!intakeHeaderBean.personCompletingFormFlagBoolean}" /> </h:panelGrid> </a4j:outputPanel> </h:panelGroup> </a4j:outputPanel> </a4j:region> </h:panelGrid> : : </a4j:outputPanel> </a4j:region>
Can any one has any solution.. How can I solve this issue??
Thanks in Advance...
Mitesh