7 Replies Latest reply on Aug 24, 2012 4:56 AM by Sergey Morenets

    problem in switch type of rich:tabPanel

    madhu reddy Newbie

      Hi,

       

                I am facing problem switchType="ajax" of rich:tabPanel.when i put switch type either client or server it is properly working but when i put switchtype ajax the tab is not opening but back end code is working but tab is not opening.can any one help me to solve this problem.

       

       

      Thanking u

      madhu

        • 1. Re: problem in switch type of rich:tabPanel
          Nick Belaevski Master

          Hi,

           

          Are there any errors/warnings in a4j:log or browser error console?

          • 2. Re: problem in switch type of rich:tabPanel
            madhu reddy Newbie

            Hi Nick Belaevski,

             

             

                              No any errors messages are not displaying only background table scripts are executing on the server but the tab is not opening.

             

            Reply me as i am stucked with this for last 2 weeks.I have tried in several ways but i am unable to solve that problem.

             

            Quick respons is appreciated.

             

            thanking u

            • 3. Re: problem in switch type of rich:tabPanel
              Nick Belaevski Master
              Please post data logged by a4j:log.
              • 4. Re: problem in switch type of rich:tabPanel
                Sergey Morenets Novice

                The same issue happens to me. If I use switchType "ajax" the tabs are not updated. Although the itemChangeListener works properly and makes server calls.

                Please see below the a4j:log details. I clicked both tabs.

                 

                RichFaces 4.2.2

                 

                debug[11:13:58.118]: New request added to queue. Queue requestGroupingId changed to myForm:j_idt494

                debug[11:13:58.119]: Queue will wait 0ms before submit

                debug[11:13:58.120]: richfaces.queue: will submit request NOW

                info [11:13:58.123]: Received 'begin' event from <div id=myForm:j_idt494 ...>

                info [11:13:58.212]: Received 'beforedomupdate' event from <div id=myForm:j_idt494 ...>

                debug[11:13:58.212]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="javax.faces.ViewState"><![CDATA[e380s1]]></update></changes></partial-response>

                info [11:13:58.214]: Listing content of response changes element:

                Element update for id=javax.faces.ViewState

                <update id="javax.faces.ViewState"><![CDATA[e380s1]]></update>

                debug[11:13:58.214]: richfaces.queue: ajax submit successfull

                debug[11:13:58.215]: richfaces.queue: Nothing to submit

                info [11:13:58.216]: Received 'success' event from <div id=myForm:j_idt494 ...>

                info [11:13:58.217]: Received 'complete' event from <div id=myForm:j_idt494 ...>

                debug[11:14:02.101]: New request added to queue. Queue requestGroupingId changed to myForm:j_idt493

                debug[11:14:02.102]: Queue will wait 0ms before submit

                debug[11:14:02.102]: richfaces.queue: will submit request NOW

                info [11:14:02.104]: Received 'begin' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                debug[11:14:02.111]: New request added to queue. Queue requestGroupingId changed to myForm:j_idt493

                debug[11:14:02.111]: Queue will wait 0ms before submit

                debug[11:14:02.112]: richfaces.queue: Waiting for previous submit results

                info [11:14:02.181]: Received 'beforedomupdate' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                debug[11:14:02.182]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="javax.faces.ViewState"><![CDATA[e380s1]]></update></changes></partial-response>

                info [11:14:02.183]: Listing content of response changes element:

                Element update for id=javax.faces.ViewState

                <update id="javax.faces.ViewState"><![CDATA[e380s1]]></update>

                debug[11:14:02.184]: richfaces.queue: ajax submit successfull

                debug[11:14:02.184]: richfaces.queue: will submit request NOW

                info [11:14:02.186]: Received 'success' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                info [11:14:02.186]: Received 'complete' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                info [11:14:02.187]: Received 'begin' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                info [11:14:02.268]: Received 'beforedomupdate' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                debug[11:14:02.268]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="javax.faces.ViewState"><![CDATA[e380s1]]></update></changes></partial-response>

                info [11:14:02.270]: Listing content of response changes element:

                Element update for id=javax.faces.ViewState

                <update id="javax.faces.ViewState"><![CDATA[e380s1]]></update>

                debug[11:14:02.270]: richfaces.queue: ajax submit successfull

                debug[11:14:02.271]: richfaces.queue: Nothing to submit

                info [11:14:02.272]: Received 'success' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                info [11:14:02.273]: Received 'complete' event from <div id=myForm:j_idt493 class="rf-tab" ...>

                • 5. Re: problem in switch type of rich:tabPanel
                  Sergey Morenets Novice

                  I performed small investigation. I downloaded showCase application, updated its configuration(libraries versions) and tried to reproduce the issue.

                  It works fine and here is a4j log.

                   

                  debug[11:34:03.743]: New request added to queue. Queue requestGroupingId changed to j_idt91:j_idt95

                   

                  debug[11:34:03.744]: Queue will wait 0ms before submit

                  debug[11:34:03.745]: richfaces.queue: will submit request NOW

                  info [11:34:03.747]: Received 'begin' event from <div id=j_idt91:j_idt95 ...>

                  info [11:34:03.777]: Received 'beforedomupdate' event from <div id=j_idt91:j_idt95 ...>

                  debug[11:34:03.779]: Server returned responseText: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="j_idt91:j_idt95"><![CDATA[<div id="j_idt91:j_idt95" class="rf-tab"><div class="rf-tab-cnt" id="j_idt91:j_idt95:content"> Here is tab #2 </div><script type="text/javascript">new RichFaces.ui.Tab("j_idt91:j_idt95",{"index":1,"leave":null,"togglePanelId":"j_idt91:tp","switchMode":"ajax","name":"j_idt95","enter":null,"disabled":false} )</script></div>]]></update><update id="javax.faces.ViewState"><![CDATA[7719659554944323852:6220287060679276215]]></update><extension  id="org.richfaces.extension"><complete>RichFaces.$('j_idt91:tp').onCompleteHandler('j_idt95');;</complete></extension></changes></partial-response>

                  info [11:34:03.782]: Listing content of response changes element:
                  Element update for id=j_idt91:j_idt95
                  <update id="j_idt91:j_idt95"><![CDATA[<div id="j_idt91:j_idt95" class="rf-tab"><div class="rf-tab-cnt" id="j_idt91:j_idt95:content"> Here is tab #2 </div><script type="text/javascript">new RichFaces.ui.Tab("j_idt91:j_idt95",{"index":1,"leave":null,"togglePanelId":"j_idt91:tp","switchMode":"ajax","name":"j_idt95","enter":null,"disabled":false} )</script></div>]]></update>
                  Element update for id=javax.faces.ViewState
                  <update id="javax.faces.ViewState"><![CDATA[7719659554944323852:6220287060679276215]]></update>
                  Element extension for id=org.richfaces.extension
                  <extension  id="org.richfaces.extension"><complete>RichFaces.$('j_idt91:tp').onCompleteHandler('j_idt95');;</complete></extension>

                  debug[11:34:03.790]: richfaces.queue: ajax submit successfull

                  debug[11:34:03.791]: richfaces.queue: Nothing to submit

                  info [11:34:03.792]: Received 'success' event from <div id=j_idt91:j_idt95 ...>

                  info [11:34:03.842]: Received 'complete' event from <div id=j_idt91:j_idt95 ...>

                  • 6. Re: problem in switch type of rich:tabPanel
                    Brendan Healey Master

                    Sergey, maybe it would be best to open a new topic as this one is so old. Can you show us the code you're using for the

                    rich:tabPanel, any h:form and h:body components. Can you reload a page with firebug net tab (check Persist) or chrome

                    developer tools network tab and see if any resources are shown in red?

                     

                    Regards,

                    Brendan.

                    • 7. Re: problem in switch type of rich:tabPanel
                      Sergey Morenets Novice

                      Brendan, it makes sense. Thak your for the reply.

                       

                      I created new topic here https://community.jboss.org/thread/204469