9 Replies Latest reply on Apr 8, 2008 6:30 AM by Rangel Preis

    reRender attribute does not work any more with richfaces 3.2

    Hongqi Jia Newbie

      Hi,

      After I updated my richfaces libraries to the latest 3.2.0GA releases, all my reRender attributes inside a4j:support failed to work any more. If I roll back the libraries back to 3.1.4.GA release, then the same code will work again. Does anyone else experience the very same problem? Or is there any tricks that I missed when upgrade richfaces for this latest release?

      Thanks in advance for any help.

      Hongqi

        • 2. Re: reRender attribute does not work any more with richfaces
          Hongqi Jia Newbie

          Hi, I'm sorry for the late reply. I had problems to login to this site this whole morning. Here is the sample code in my project:

          <s:decorate id="provinceDecoration" template="../layout/edit.xhtml">
          <ui:define name="label">Province</ui:define>
          <h:selectOneMenu id="proviences" value="#{user.provience}" required="true">
          <a:support ajaxSingle="true" immediate="true" reRender="city" event="onchange" />
          <a:support event="onblur" reRender="provinceDecoration" bypassUpdates="true" ajaxSingle="true" />
          <s:selectItems value="#{apts:getProvinces()}" var="prov" label="${prov}" noSelectionLabel="Plese Select"
          hideNoSelectionLabel="true" />
          </h:selectOneMenu>
          </s:decorate>
          <s:decorate id="cityDecoration" template="../layout/edit.xhtml">
          <ui:define name="label">City</ui:define>
          <h:selectOneMenu id="city" value="#{user.city}" required="true">
          <a:support event="onblur" reRender="cityDecoration" bypassUpdates="true" ajaxSingle="true" />
          <s:selectItems value="#{apts:getCitiesOfProvince(user.provience)}" var="city" label="${city}"
          noSelectionLabel="Please Select" hideNoSelectionLabel="true" />
          </h:selectOneMenu>
          </s:decorate>

          With 3.1.4.GA richfaces library, the "City" drop-down list varies based on different "Province" values selected. Now with 3.2.0.GA richfaces library, the "City" drop-down list is empty after "Province" field is selected (reRender="city" attribute failed). BTW the code is the same without any change at all.

          I also opened an bug report to richfaces project team also.

          • 3. Re: reRender attribute does not work any more with richfaces
            Sergey Smirnov Master

            please, post the URL to the Jira issue when you open it based on info from the particular forum thread

            • 4. Re: reRender attribute does not work any more with richfaces
              Hongqi Jia Newbie

              The problem is solved by using 'process' attribute. Thanks for your help.

              • 5. Re: reRender attribute does not work any more with richfaces
                IVAN BATISTA MORENO Newbie

                Hi,

                I am with the same problem, I’m sorry, I don’t understand, how solve using 'process' attribute.

                Thank you,

                ivan

                • 6. Re: reRender attribute does not work any more with richfaces
                  Hongqi Jia Newbie

                  Hi Ivan,

                  I happened to read another post in this forum (I forgot the title) about the same issue. According to the reply of Sergey Smirnov in that post, the current behavior of 3.2.0 richfaces is the correct (complying to jsf1.2 standard) one, and it will stay as it is from now on. The feature we used (as in my code) is a side-effect feature and will not work any more. The correct solution is to use the 'process' attribute for our purpose. Here is my new code:

                  <s:decorate id="provinceDecoration" template="../layout/edit.xhtml">
                  <ui:define name="label">Province</ui:define>
                  <h:selectOneMenu id="proviences" value="#{user.provience}" required="true">
                  <a:support ajaxSingle="true" reRender="city" event="onchange" />
                  <a:support event="onblur" reRender="provinceDecoration" bypassUpdates="true" ajaxSingle="true" />
                  <s:selectItems value="#{apts:getProvinces()}" var="prov" label="${prov}" noSelectionLabel="Plese Select"
                  hideNoSelectionLabel="true" />
                  </h:selectOneMenu>
                  </s:decorate>
                  <s:decorate id="cityDecoration" template="../layout/edit.xhtml">
                  <ui:define name="label">City</ui:define>
                  <h:selectOneMenu id="city" value="#{user.city}" required="true">
                  <a:support event="onclick" process="proviences" bypassUpdates="true" ajaxSingle="true" />
                  <a:support event="onblur" reRender="cityDecoration" bypassUpdates="true" ajaxSingle="true" />
                  <s:selectItems value="#{apts:getCitiesOfProvince(user.provience)}" var="city" label="${city}"
                  noSelectionLabel="Please Select" hideNoSelectionLabel="true" />
                  </h:selectOneMenu>
                  </s:decorate>

                  Hope this helps.

                  Hong

                  • 7. Re: reRender attribute does not work any more with richfaces
                    IVAN BATISTA MORENO Newbie

                    Hi,

                    It didn't work, the tag "PROCESS" doesn't have in <ajax:support>, see as I am doing:

                    <h:outputLabel value="Unidade Organizacional:" />
                     <h:selectOneMenu value="#{candidatoManager.candidatoForm.codigoUnidadeOrganizacional}" styleClass="rsInput">
                     <f:selectItem itemValue="0" itemLabel="-- SELECIONE UMA UNIDADE ORGANIZACIONAL --" />
                     <f:selectItems value="#{candidatoManager.selectItemsUnidadeOrganizacional}"/>
                     <ajax:support event="onchange" ajaxSingle="true" reRender="lotacao,cargo,perfil" immediate="true"/>
                     </h:selectOneMenu>
                    
                     <h:outputLabel value="Lotação:" />
                     <h:selectOneMenu id="lotacao" value="#{candidatoManager.candidatoForm.codigoLotacao}" styleClass="rsInput">
                     <f:selectItem itemValue="0" itemLabel="-- SELECIONE UMA UNIDADE LOTAÇÃO --" />
                     <f:selectItems value="#{candidatoManager.selectItemsLotacao}"/>
                     <ajax:support event="onchange" ajaxSingle="true" reRender="cargo,perfil" immediate="true"/>
                     </h:selectOneMenu>
                    
                     <h:outputLabel value="Cargo:" />
                     <h:selectOneMenu id="cargo" value="#{candidatoManager.candidatoForm.codigoCargo}" styleClass="rsInput" >
                     <f:selectItem itemValue="0" itemLabel="-- SELECIONE UM CARGO --" />
                     <f:selectItems value="#{candidatoManager.selectItemsCargo}"/>
                     <ajax:support event="onchange" ajaxSingle="true" reRender="perfil" immediate="true"/>
                     </h:selectOneMenu>
                    
                     <h:outputLabel value="Perfil:" />
                     <h:selectOneMenu id="perfil" value="#{candidatoManager.candidatoForm.codigoPerfil}" styleClass="rsInput">
                     <f:selectItem itemValue="0" itemLabel="-- SELECIONE PERFIL --" />
                     <f:selectItems value="#{candidatoManager.selectItemsPerfil}"/>
                     </h:selectOneMenu>


                    whill bug of the version 3.2 be? In the version 3.1.4 I didn't have that problem.

                    • 8. Re: reRender attribute does not work any more with richfaces
                      Hongqi Jia Newbie

                      version 3.2.0.GA of richfaces has 'process' attribute, but 3.1.4.GA does not have. According to richfaces developer, this is not a bug, it is the way it is supposed (comply to JSF1.2 standard) to be. If you don't have 'process' attribute, then you are not using 3.2.0.GA richfaces.

                      BTW, you need to remove immediate="true" out of your ajax:support node

                      • 9. Re: reRender attribute does not work any more with richfaces
                        Rangel Preis Newbie

                        I can't solve my problem using the process attribute someone can see my code?

                        http://jboss.com/index.html?module=bb&op=viewtopic&t=133146