I have a button. Clicking on the button would open/reRender a popup with 3 tabs. Whenever the popup opens, I want the first tab to be selected.
On the Back button of each tab, I set the selectedTab to the first tab and hide the popup.
But Richfaces 3.3.3 Final always opens the popup with the last tab I was on. It seem to ignore the selectedTab value.
Here is the code snippet.
<a4j:commandButton
action="#{myController.doSomething()}"
value="Open Tabbed Popup"
ajaxSingle="true"
reRender="myPanel"
oncomplete="Richfaces.showModalPanel('myPanel')" />
<rich:modalPanel id="myPanel" width="750" height="600">
<f:facet name="header">
<h:outputText value="My Panel" />
</f:facet>
<rich:tabPanel switchType="ajax" id="myPanelTabs" selectedTab="#{myController.selectedTab}">
<rich:tab label="myPanelTab1" id="myPanelTab1" name="myPanelTab1">
<ui:include src="./myPanelTab1.xhtml" />
</rich:tab>
<rich:tab label="myPanelTab2" id="myPanelTab2" name="myPanelTab2">
<ui:include src="./myPanelTab2.xhtml" />
</rich:tab>
<rich:tab label="myPanelTab3" id="myPanelTab3" name="myPanelTab3">
<ui:include src="./myPanelTab3.xhtml" />
</rich:tab>
</rich:tabPanel>
</rich:modalPanel>
Back Button on tabs
<a4j:commandButton value="Back" action="#{myController.setSelectedTab(myPanelTab1)}" oncomplete="Richfaces.hideModalPanel('myPanel');" />