0 Replies Latest reply on Jul 27, 2011 2:53 AM by sun ray

    Modal Panel - tabbed Panel ignoring selected tab

    sun ray Newbie

      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.




              value="Open Tabbed Popup"



              oncomplete="Richfaces.showModalPanel('myPanel')" />


      <rich:modalPanel id="myPanel" width="750" height="600">

          <f:facet name="header">

              <h:outputText value="My Panel" />



          <rich:tabPanel switchType="ajax" id="myPanelTabs" selectedTab="#{myController.selectedTab}">

              <rich:tab label="myPanelTab1" id="myPanelTab1" name="myPanelTab1">

                  <ui:include src="./myPanelTab1.xhtml" />


              <rich:tab label="myPanelTab2" id="myPanelTab2" name="myPanelTab2">

                  <ui:include src="./myPanelTab2.xhtml" />


              <rich:tab label="myPanelTab3" id="myPanelTab3" name="myPanelTab3">

                   <ui:include src="./myPanelTab3.xhtml" />





      Back Button on tabs


      <a4j:commandButton  value="Back" action="#{myController.setSelectedTab(myPanelTab1)}" oncomplete="Richfaces.hideModalPanel('myPanel');" />