4 Replies Latest reply on Apr 21, 2008 6:00 AM by Denis Marzadro

    tabpane event problem

    Denis Marzadro Novice

      Hi all,

      env:
      - richfaces 3.2.0GA
      - myfaces 1.2.2
      - tomcat 6.0.16
      - webapp with faces tecnology and richfaces component

      Maybe i don't use correctly but I find some problems using tabpane with switchType="ajax" and a a4j:support for each tab. Event semas to not be sent every time

      the complete code is
      <rich:tabPanel switchType="ajax" value="#{myFormBean.searchBean.tabSelected}" immediate="true" >
      <a4j:support event="ontableave" reRender="combo1, section2" actionListener="#{myFormBean.searchBean.changeTab}"></a4j:support>
      ....

      I don't know if it could be an ajax problem but sometime the change tab event aren't send. It is really random situation: some time it works for 40 times and then doesn't work once, some times it doesn't work many times from the beginning...

      Someone have seen the same behaviour?

      thanks in advance

        • 1. Re: tabpane event problem
          Denis Marzadro Novice

          i used log and find this error message... maybe the wrong behaviour depend on it, i don't know

          code
          ------

          <rich:tabPanel switchType="ajax" value="#{nautilusFormBean.nautilusRicercaBean.tabSelezionato}">
          <rich:tab id="catasto" label="#{messages_.catasto}" requestDelay="0" styleClass="lblTab" immediate="true">
          <h:outputText value="tab1"></h:outputText>
          </rich:tab>
          <rich:tab id="indirizzi" label="#{messages_.indirizzi}" requestDelay="0" styleClass="lblTab" immediate="true">
          <h:outputText value="tab2"></h:outputText>
          </rich:tab>
          <rich:tab id="pratiche" label="#{messages_.pratiche}" requestDelay="0" styleClass="lblTab" immediate="true">
          <h:outputText value="tab3"></h:outputText>
          </rich:tab>
          <rich:tab id="codifiche" label="#{messages_.codifiche}" requestDelay="0" styleClass="lblTab" immediate="true">
          <h:outputText value="tab4"></h:outputText>
          </rich:tab>
          <rich:tab id="nominativi" label="#{messages_.nominativi}" requestDelay="0" styleClass="lblTab" immediate="true">
          <h:outputText value="tab5"></h:outputText>
          </rich:tab>
          </rich:tabPanel>


          trace
          ------


          debug[16:55:56,978]: Such element exist in document
          debug[16:55:56,978]: in response with src=../styles/nautilus.css
          debug[16:55:56,978]: Such element exist in document
          debug[16:55:56,978]: Attempt to update part of page for Id: nautilusForm:j_id_jsp_575199196_5
          debug[16:55:56,978]: call selectSingleNode for id= nautilusForm:j_id_jsp_575199196_5
          debug[16:55:56,978]: Replace content of node by outerHTML()
          error[16:55:56,993]: Error to clear node content by innerHTML Errore di run-time sconosciuto
          debug[16:55:56,993]: search for elements by name 'script' in element table
          debug[16:55:56,993]: selectNodes found 1
          debug[16:55:56,993]: Scripts in updated part count : 1
          debug[16:55:56,993]: Update part of page for Id: nautilusForm:j_id_jsp_575199196_5 successful
          debug[16:55:56,993]: call selectSingleNode for id= ajax-view-state
          debug[16:55:56,993]: Hidden JSF state fields:
          debug[16:55:56,993]: Namespace for hidden view-state input fields is undefined
          debug[16:55:56,993]: search for elements by name 'input' in element span
          debug[16:55:56,993]: selectNodes found 1

          • 2. Re: tabpane event problem
            Nick Belaevski Master

            What are combo1, section2 components?

            • 3. Re: tabpane event problem
              Ilya Shaikovsky Master

              Let me guess..
              One event is fired before the tab leaved (via a4j:support), and the second request fired then by tabPanel in order to change the tab.

              Are you sure that the components you tried to update via support already present in DOM?

              Why you can't just use rich:tab rerender attribute instead of sending another request?

              • 4. Re: tabpane event problem
                Denis Marzadro Novice

                sorry i couldn't answer last week.
                Well i didn't solve the problem, i had to change completely the way to do what i need, and now i have just components into the tab sections (and not compenent inside and panel outside) and the rerender of them works correctly. Now i just have styles problem in IE7 that may depend of the panelGroups i use inside the tabpane... i will see

                thanks to all