6 Replies Latest reply on Sep 20, 2007 12:47 PM by Ilya Shaikovsky

    ReRendered h:selectOneMenu Not Sending Value to BackingBean

    Jason Thiesse Newbie

      My goal is to using one selectOneMenu to drive a couple of other selectOneMenus. For example Tier1 will drive Tier2 and Tier2 will drive Tier3.

      Take the following code:

      <a4j:region selfRendered="true">
      
      <h:selectOneMenu id="tier1" value="#{pc_DocumentEdit.selectedTier1}" required="false" styleClass="input-width-dropdown-reg">
       <f:selectItems value="#{pc_TiersAndLevels.tier1SelectItems}"/>
       <a4j:support event="onchange" action="#{pc_DocumentEdit.tier1Change}" reRender="tier2,tier3" ajaxSingle="true" immediate="false" />
      </h:selectOneMenu>
      
      <h:selectOneMenu id="tier2" value="#{pc_DocumentEdit.selectedTier2}" required="false" styleClass="input-width-dropdown-reg" disabled="#{empty pc_DocumentEdit.selectedTier1 ? true : false}">
       <f:selectItems value="#{pc_TiersAndLevels.tier2SelectItems}"/>
       <a4j:support event="onchange" action="#{pc_DocumentEdit.tier2Change}" ajaxSingle="true" immediate="false" />
      </h:selectOneMenu>
      
      <h:selectOneMenu id="tier3" value="#{pc_DocumentEdit.selectedTier3}" required="false" styleClass="input-width-dropdown-reg" disabled="#{empty pc_DocumentEdit.selectedTier2 ? true : false}">
       <f:selectItems value="#{pc_TiersAndLevels.tier3SelectItems}"/>
       <a4j:support event="onchange" action="#{pc_DocumentEdit.tier1Change}" ajaxSingle="true" immediate="false" />
      </h:selectOneMenu>
      
      </a4j:region>
      


      The selection of tier1 works as expected, tier2 drop down is populated with the new values. When .tier2Change method is called on a tier2 change the value of selectedTier2 is null on the backing bean.

      Any ideas? Is it not possible to send a value from a reRendered component?