1 Reply Latest reply on Feb 21, 2011 10:03 PM by conan na

    Newbie question: how to use rich:tabpanel and rich:tab to control e.g. radio button

    conan na Newbie



      I'm new to richfaces and learning how to use this framework by reading "Practical Richfaces". Now, I have tried out one example on page 102 that radio buttons can control tabs on a tab panel. But I just could not make an inverse control with them. So I think my question could be like how to use tabs to rerender other components when tabs change from one to another. For example, how can I show the name of which tab I'm viewing at the right top of the page?


      Here is my test code:


      <ui:define name="body">


                  <rich:tabPanel style="width: 100%;" switchType="ajax" selectedTab="#{tabMenuBean.selectedTab}">

                      <f:facet name="header">

                          <h:outputText value="MainTabPanel" />


                      <rich:tab id="inboxTab" label="Inbox" reRender="displayTabOutputText"></rich:tab>

                      <rich:tab id="accountTab" label="Account"></rich:tab>





      To display the tab name:


      <rich:toolBarGroup id="rightToolBarGroup" location="right">

             <h:outputText id="selectedTabName" value="#{tabMenuBean.selectedTab}"/>

              <s:link id="menuLogoutId" view="/login.html" action="#{identity.logout}" value="Logout" propagation="none"/>



      As I'm using seam, that "tabMenuBean" is a seam component.


      Any help is appreciated.