1 Reply Latest reply on Apr 5, 2007 4:04 AM by Chris Null

    switching tabs of rich:tabPanel programmatically

    Chris Null Newbie


      I want to switch to a different tab in rich:tabPanel by pressing a button.
      I tried this:

      <rich:tabPanel id="tabTest" switchType="server" binding="#{tabtest.tabPanel}">
       <rich:tab id="tab1" name="tab1" label="tab1" >
       <h:commandButton action="#{tabtest.switchTab}" />
       <rich:tab id="tab2" name="tab2" label="tab2" >

      With the backing bean:
      public class Tabs implements Serializable {
       private HtmlTabPanel tabPanel;
       public HtmlTabPanel getTabPanel() {
       return tabPanel;
       public void setTabPanel(HtmlTabPanel tabPanel) {
       this.tabPanel = tabPanel;
       public void switchTab() {

      This code gives me no results.
      I'm using richfaces-3.0.0, ajax4jsf-1.1.0, myfaces-1.1.4

      So, how can a switch to the other tab?