Java Mailing List Archive

http://www.junlu.com/

Home » users.myfaces »

Get how to change selected tab

AM

2012-03-28

Replies: Find Java Web Hosting

Author LoginPost Reply
I have 3 Tabs in a tabGroup.

When i am on the third tab and i click there on a button i want to go
back to the first tab automatically.

Code:

<tc:tabGroup id="tabs" rendered="#{controller.anotherId != 0}"
selectedIndex="#{controller.tabId}" >

          <tc:tab label="ABC">
           </tc:tab>

            <tc:tab label="DEF">
            </tc:tab>

            <tc:tab label="GHI">
            </tc:tab>
</tc:tabGroup>

in my java-code i have getter&setter for tabId.
whith this solution, i have to click twice on the button to return to
the first tab.
©2008 junlu.com - Jax Systems, LLC, U.S.A.