3 Replies Latest reply on Jul 11, 2013 2:48 PM by bleathem

    After migrating to JSF2.2 InputTextBox values are not displaying values .

    ravi.f39

      Hi,

       

      I am facing problem after migrating to JSF 2.2 from JSF 2.0.

       

      With in one xhtml there are 2 forms.

       

      form-1 has a table and there is edit button. When I click on edit button I have to render 2nd form and it will display the results.

       

       

      The problem when we migrated to JSF 2.2 is InputText boxes are not dispalying values in the form2.

      Note: outputTextboxes values are displaying.

       

      Every thing is working fine with JSF2.0 and we are using richfaces 4.2 ()

       

       

      Thanks,

      Ravi.K

        • 1. Re: After migrating to JSF2.2 InputTextBox values are not displaying values .
          bleathem

          Can you post some code that reproduces your problem?

          • 2. Re: After migrating to JSF2.2 InputTextBox values are not displaying values .
            ravi.f39

            Hi,

             

            Below is my code

             

             

            <html xmlns="http://www.w3.org/1999/xhtml"

                xmlns:h="http://java.sun.com/jsf/html"

                xmlns:f="http://java.sun.com/jsf/core"

                xmlns:ui="http://java.sun.com/jsf/facelets"

                xmlns:rich="http://richfaces.org/rich"

                xmlns:t="http://myfaces.apache.org/tomahawk"

                xmlns:cc="http://coreui.net/jsf/html"

                xmlns:fn="http://java.sun.com/jsp/jstl/functions">

             

            <ui:composition template="/xhtml/account/layout/accountLayout.xhtml">

                <ui:define name="content">

             

                       <h:form id="form1" prependId="false">

             

                        <fieldset>

             

                                <div class="ctrlHolder">

             

                            <h:outputLabel value="Enter Name: " id="nameId" />

             

                            <h:inputText value="#{testBean.name}"  id="inputNameId" >

             

                            </h:inputText>

             

                        </div>

             

                        <div class="spacer"></div>

             

                                <div class="buttonHolder">

             

                                    <rich:commandButton value="Submit" styleClass="buttinz" action="#{testBean.testAction}" render="secondForm" />

             

                                </div>

             

                        </fieldset>           

             

                    </h:form>

             

             

             

                    <h:form id="form2" prependId="false">

             

                        <rich:outputPanel id="secondForm">

             

                            <rich:outputPanel rendered="#{testBean.secondFormRendered}">

             

             

             

                            <div class="ctrlHolder">

             

                                 <h:outputLabel value="My Name is : " id="displayLabelNameId1" />

             

                                 <h:inputText value="#{testBean.name}"  id="inputTextNameId" />                        

             

                           </div>

             

                           <div class="ctrlHolder">

             

                                 <h:outputLabel value="My Name is : " id="displayLabelNameId2" />

             

                                 <h:outputText value="#{testBean.name}" styleClass="readOnly" id="outputTextNameId" />                       

             

                        </div>

             

                            </rich:outputPanel>

             

                        </rich:outputPanel>

             

                    </h:form>

             

                </ui:define>

            </ui:composition>

            </html>

             

             

            TestScreen.bmp

             

             

            Note: Scope of bean is view.

            • 3. Re: After migrating to JSF2.2 InputTextBox values are not displaying values .
              bleathem

              Are you using CDI?  There are some changes w.r.t. ViewScoped in JSF 2.2, see: https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1087

               

              Does it work as expected if you change the scope of the bean?