0 Replies Latest reply on Oct 27, 2008 8:58 PM by suzhen

    InputText not submitted

    suzhen
      I have a checkbok to enable/disabled the inputText fields. When checkbox is unchecked (default value) the inputText field disabled, otherwise, InputText enabled.

      The issue is when I check the checkbox the iputText fields are enabled, then I input the data on them , then submit the form, the seam never submit the inputText data.

      here is my code:
      <h:selectBooleanCheckbox id="reconfig" value="#{testBean.reconfig}" valueChangeListener="#{testBean.reconfigName}" immediate="true" onclick="this.form.submit();"/>
                   
                   <h:outputFormat value="Test"></h:outputFormat>
                   <div >
                      <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
                           <h:outputLabel for="name1">Name1</h:outputLabel>
                           <h:inputText id="name1" value="#{testBean.name1}" disabled="#{!testBean.reconfig}"/>
                           <h:outputLabel for="name2">Name2</h:outputLabel>
                          <h:inputText id="name2" value="#{testBane.name2}" disabled="#{!testBean.reconfig}"/>
                      </h:panelGrid>  
                  </div>


      Java code:
           public void reconfigData(ValueChangeEvent event){
                 Boolean newValue = new Boolean(((Boolean)event.getNewValue()).booleanValue());
                 reconfig = newValue.booleanValue();
                 FacesContext.getCurrentInstance().renderResponse();
           }

      I use jboss-seam-2.0.2.SP1 and tomcat6.

      Thanks!

      Suzhen