3 Replies Latest reply on May 5, 2010 4:37 AM by Ilya Shaikovsky

    inputText not rendered inside selectOneMenu

    jacinh lee Newbie



      I have searched other discussions on the forum but can't seem to find a workng solution.


      I am trying to render additional input text fields based on the selection from a selectOneMenu.  However, the value I enter into the inputText field is not being submitted (setter not called).   For example, when i select option b, and enter value into value2 input field, it doesn't seem to think the field is rendered, eventhough it's rendered on screen.



      My code:

            <a4j:form id="block">
                <h:selectOneMenu value="#{testBean.option}" immediate="true">
                  <f:selectItem itemValue="a" />
                  <f:selectItem itemValue="b" />
                  <f:selectItem itemValue="c" />
                  <a4j:support event="onchange" reRender="block"
                    ajaxSingle="true" />
              <h:outputText value="block A " rendered="#{testBean.option=='a'}" />
              <h:inputText value="#{testBean.value1}" id="value1"
              <h:outputText value="block B " rendered="#{testBean.option=='b'}" />
              <h:inputText value="#{testBean.value2}" id="value2"
              <h:outputText value="block C " rendered="#{testBean.option=='c'}" />
              <h:inputText value="#{testBean.value3}" id="value3"
              <a4j:commandButton styleClass="" value="Submit"
                action="#{testBean.save}" />


      Any input apprediated!!