2 Replies Latest reply on Jul 31, 2008 1:35 PM by smithmikesmth

    Ajax4JSF Updating Bean Value Problem

    bill78b

      Hi

      I am using some of the Ajax4jsf Components to render the page and some of JSF Components...Some times Ajax4jsf events are not updating the Bean Value and Some times it is updating ... I am not getting this problem Continually.Some times I use to face the problem … I am using <a4j:support> tag…

      Here is the Code …

      <a4j:region immediate="true" renderRegionOnly="true"
      rendered="true">
      <a4j:outputPanel rendered="true" ajaxRendered="true">


      <h:panelGrid columns="3"
      rendered="#{intakeHeaderBean.displayFlags['MULTIPLE_EMPLOYER_FLAG']=='Y'}">
      <h:outputText styleClass="FormTitle"
      value="#{intakeHeaderBean.columnNames['MULTIPLE_EMPLOYER_FLAG']}" />


      <h:outputText styleClass="FormTitle"
      style="padding-left: 5px;color:red;"
      rendered="#{intakeHeaderBean.mandatoryFlags['MULTIPLE_EMPLOYER_FLAG']=='Y'}"
      value="*" />
      <h:selectOneRadio layout="lineDirection" immediate="true"
      id="MultipleEmpoyerFlag"
      styleClass="FrmNormalType"
      value="#{intakeHeaderBean.multipleEmployerFlag}"
      rendered="#{intakeHeaderBean.displayFlags['MULTIPLE_EMPLOYER_FLAG']=='Y'}"
      required="#{intakeHeaderBean.mandatoryFlags['MULTIPLE_EMPLOYER_FLAG']=='Y'}"
      >
      <f:selectItem itemLabel="Yes" itemValue="Y" />
      <f:selectItem itemLabel="No" itemValue="N" />
      <f:attribute name="MultipleEmpoyerFlag" value="#{intakeHeaderBean.columnNames['MULTIPLE_EMPLOYER_FLAG']}" />
      <a4j:support event="onclick" ajaxSingle="true"
      reRender="MoreThanOneEmployeePanelGrid">
      </a4j:support>
      </h:selectOneRadio>
      <h:outputText value="" />
      <h:outputText value="" />
      <h:panelGroup rendered="#{intakeHeaderBean.multipleEmployerFlag=='Y'}">

      <a4j:outputPanel rendered="true"
      id="MoreThanOneEmployeePanelGrid" ajaxRendered="true">
      <h:panelGrid columns="1" cellpadding="0" cellspacing="0"
      rendered="#{intakeHeaderBean.multipleEmployerFlag=='Y'}">
      <h:message styleClass="FrmItalType style1"

      style="padding-left: 5px;" for="OtherEmployerName" />
      <h:message styleClass="FrmItalType style1"

      style="padding-left: 5px;" for="OtherEmplyoerAddress" />
      </h:panelGrid>
      <h:panelGrid columns="1">

      <h:panelGrid columns="2"
      rendered="#{intakeHeaderBean.multipleEmployerFlag=='Y'}">
      <h:panelGroup
      rendered="#{intakeHeaderBean.displayFlags['OTHER_EMPLOYER_NAME']=='Y'}">
      <h:outputText styleClass="FrmResultsType"

      value="#{intakeHeaderBean.columnNames['OTHER_EMPLOYER_NAME']}" />
      <h:outputText styleClass="FormTitle"
      style="padding-left: 5px;color:red;"
      rendered="#{intakeHeaderBean.mandatoryFlags['OTHER_EMPLOYER_NAME']=='Y'}"
      value="*" />
      </h:panelGroup>
      <h:inputText
      value="#{intakeHeaderBean.otherEmployerName}"
      validator="#{utilityBean.validateName}"
      id="OtherEmployerName"
      rendered="#{intakeHeaderBean.multipleEmployerFlag=='Y' && intakeHeaderBean.displayFlags['OTHER_EMPLOYER_NAME']=='Y'}"
      required="#{intakeHeaderBean.multipleEmployerFlag=='Y'}"
      styleClass="FrmNormalType"
      immediate="false"
      maxlength="100">
      <f:attribute name="OtherEmployerName" value="#{intakeHeaderBean.columnNames['OTHER_EMPLOYER_NAME']}" />
      <f:validateLength maximum="100" />
      </h:inputText>
      <h:panelGroup
      rendered="#{intakeHeaderBean.displayFlags['OTHER_EMPLOYER_ADDRESS']=='Y'}">
      <h:outputText styleClass="FrmResultsType"

      value="#{intakeHeaderBean.columnNames['OTHER_EMPLOYER_ADDRESS']}" />
      <h:outputText styleClass="FormTitle"
      style="padding-left: 5px;color:red;"
      rendered="#{intakeHeaderBean.mandatoryFlags['OTHER_EMPLOYER_ADDRESS']=='Y'}"
      value="*" />
      </h:panelGroup>

      <h:inputTextarea rows="3" cols="30"
      id="OtherEmplyoerAddress"
      onkeydown="textCounter(this,250);"
      onkeyup="textCounter(this,250);"
      validator="#{utilityBean.validateAddress}"
      value="#{intakeHeaderBean.otherEmployerAddress}"
      rendered="#{intakeHeaderBean.multipleEmployerFlag=='Y' && intakeHeaderBean.displayFlags['OTHER_EMPLOYER_ADDRESS']=='Y'}"
      required="#{intakeHeaderBean.multipleEmployerFlag=='Y'}"
      styleClass="FrmNormalType"
      immediate="false">
      <f:attribute name="OtherEmplyoerAddress" value="#{intakeHeaderBean.columnNames['OTHER_EMPLOYER_ADDRESS']}" />
      <f:validateLength maximum="250" />
      </h:inputTextarea>
      </h:panelGrid>
      </h:panelGrid>
      </a4j:outputPanel>
      </h:panelGroup>
      </h:panelGrid>
      </a4j:outputPanel>
      </a4j:region>

      intakeHeaderBean.otherEmployerAddress and intakeHeaderBean.otherEmployerName .. some times these values are not updating .....

      Please help me..

      Thanks


      Venu