3 Replies Latest reply on Jun 9, 2011 10:46 AM by marweck

    tabPanel with switchType="client" rerendering all tabs on ajax events

    marweck

      Hi All,

       

      I've googled and searched the RichFaces Jira a lot and couldn't find an answer.

       

      I'm using richfaces 3.3.1 with myfaces 1.2.5 and facelets 1.1.14. on Tomcat 5.5 and Weblogic 9.

       

      I have rich:tabPanels like this one:

       

                  <rich:tabPanel width="100%" headerAlignment="left"

                      switchType="client" id="tabPanel">

       

                      <rich:tab label="A" id="tab_A" >

                          <ui:include src="page_A.xhtml"/>

                      </rich:tab>

       

                      <rich:tab label="B" id="tab_B" >

                          <ui:include src="page_B.xhtml"/>

                      </rich:tab>

                       ...

       

      They are all in client mode. All the tabs have their own h:form component.

       

      The problem is: when I perform an ajax reRender on a4j:support or a4j:commanButton inside

      one tab, all the other tabs are being rerendered no matter what I put in the reRender attribute of the

      underlying ajax command.

       

      Ex: The a4j:support below on the first selectOneMenu is causing a full reload on the other tabs.

       

              <h:outputLabel for="selectA" value="labelA" />

              <h:selectOneMenu id="selectA"  value="#{bean.fieldA}">

                  <t:selectItems var="v" value="#{bean.queryResultA}"

                      itemLabel="#{v.description}" itemValue="#{v.id}" />

                  <a4j:support action="#{bean.update}"

                      reRender="selectB" event="onchange" ajaxSingle="true"/>

              </h:selectOneMenu>

       

              <h:outputLabel for="selectB" value="labelB" />

              <h:selectOneMenu id="selectB"  value="#{bean.fieldB}">

                  <t:selectItems var="v" value="#{bean.queryResultB}"

                      itemLabel="#{v.description}" itemValue="#{v.id}" />

              </h:selectOneMenu>


      The same happens on a different tab with a button like this:

       

             <a4j:commandButton value="Persist" ajaxSingle="true" process="someInputTextId"

                   reRender="messagePainel" action="#{anotherBean.saveText}" />

       

      Where there is a h:panelGroup with id="messagePanel" on the same tab and form of this

      a4j:commandButton.

       

      Do you guys know if it's an old or solved issue, or if there is a way for me to avoid this behavior?

       

      Does it also happen to any of you?

       

      Thanks in advance.