Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11474

[rich:tabPanel] Switching tabs doesn't work correctly

    Details

    • Steps to Reproduce:
      Hide

      Steps to reproduce this issue:
      1. http://localhost:8080/jsftest/tabtest.jsf
      2. switch tabs with the commandButtons -> everything works normal
      3. switch tabs via click on the tabs itself -> everything works normal
      4. now switch tabs with the commandButtons again -> tabs are not switching anymore

      Show
      Steps to reproduce this issue: 1. http://localhost:8080/jsftest/tabtest.jsf 2. switch tabs with the commandButtons -> everything works normal 3. switch tabs via click on the tabs itself -> everything works normal 4. now switch tabs with the commandButtons again -> tabs are not switching anymore

      Description

      Switching tabs client-side (by clicking the tabs) breaks changing tabs server side (by clicking the a4j:commandButtons).

      tabtest.xhtml
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <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:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
          
          <h:head>
          	<title>Tabpanel Test</title>
          </h:head>
          
          <h:body>
          	Switching tabs doesn't work correct.
          	<br/><br/>
          	Steps to reproduce the issue: 
            	<br/>
            	1. switch tabs with the commandButtons -> everything works normal
            	<br/>
            	2. switch tabs via click on the tabs itself -> everything works normal
            	<br/>
            	3. now switch tabs with the commandButtons again -> tabs are not switching anymore
            	<br/><br/>
          	<h:form id="testform">
          		<rich:tabPanel id="tabpanel" switchType="ajax" activeItem="#{dataBean.activeTab}">
                  	<rich:tab id="tab1" header="First">
                  		Here is tab #1
              		</rich:tab>
                  	<rich:tab id="tab2" header="Second">
                  		Here is tab #2
              		</rich:tab>
                  	<rich:tab id="tab3" header="Third">
                  		Here is tab #3
              		</rich:tab>
              	</rich:tabPanel>
              	<br/><br/>
              	<a4j:commandButton id="but1" value="go to tab1" action="#{dataCtr.goToTab1}" execute="@this" render="tabpanel"/>
              	<br/><br/>
              	<a4j:commandButton id="but2" value="go to tab2" action="#{dataCtr.goToTab2}" execute="@this" render="tabpanel"/>
              	<br/><br/>
              	<a4j:commandButton id="but3" value="go to tab3" action="#{dataCtr.goToTab3}" execute="@this" render="tabpanel"/>
          	</h:form>
          	
          	<br/><br/>
          	extra information:
          	<br/>
          	DataCtr.java
          	<br/>
          	public void goToTab1(){
          	<br/>
      			dataBean.setActiveTab("tab1");
      		<br/>
      		} ...
          	
          </h:body>
      </html>
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lfryc Lukáš Fryč
                  Reporter:
                  reneo Rene O
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: