0 Replies Latest reply on Oct 1, 2008 9:15 AM by Paul Williams

    reRendering problem

    Paul Williams Newbie

       

      <a4j:region >
      <h:panelGroup id="valuesList">
       <h:inputText id="limit" value="#{balance.limit}" required="true" requiredMessage="Limit Required" validatorMessage="Not In Range. Range : 0.0 - 9999999.999999" converterMessage="Numbers Only">
       <f:validateDoubleRange minimum="0.0" maximum="9999999.999999" />
       <f:convertNumber pattern="#0.000000"/>
       <f:converter converterId="javax.faces.BigDecimal"/>
       </h:inputText>
       <h:message for="limit" styleClass="errorMessage" />
       <h:inputText id="index" value="#{balance.index}" required="true" requiredMessage="Index Required" validatorMessage="Not In Range. Range : 0.0 - 9999999.999999" converterMessage="Numbers Only">
       <f:validateDoubleRange minimum="0.0" maximum="9999999.999999" />
       <f:convertNumber pattern="#0.000000"/>
       <f:converter converterId="javax.faces.BigDecimal"/>
       </h:inputText>
       <h:message for="index" styleClass="errorMessage" />
      </h:panelGroup>
      </a4j:region >
      <a4j:region >
       <a4j:commandButton value="Insert" action="#{balanceHandler.addData}" reRender="valuesList">
      
       </a4j:commandButton>
       <a4j:commandLink value="update" action="#{balanceHandler.updateData}" reRender="valuesList">
      
       </a4j:commandLink>
      </a4j:region >



      Step 1: In the above code, when i click on update i.e. action="#{balanceHandler.updateData}" the values that are in request scope are displayed in their respective inputText through reRender="valuesList".

      Step 2: During the same time, i remove the value from limit i.e. i clear and then click on Insert i.e. action="#{balanceHandler.addData}", the JSF flags the appropriate required error message i.e. Limit Required

      Step 3: During the same time, i click on update i.e. action="#{balanceHandler.updateData}", now the values that are set in the request scope are not reRendered correctly i.e. the value that was set in Step 1's request scope for index is not reRendered to the current value that i set in the Step 3 i.e. action="#{balanceHandler.updateData}" .

      Is there any gap between the phases, since if i produce the same error but in the validation phase and repeat Step 3, the values that are set in the request scope are reRendered correctly.