Hi,
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">
<h:form>
<rich:tabPanel style="width: 100%;" switchType="ajax" selectedTab="#{tabMenuBean.selectedTab}">
<f:facet name="header">
<h:outputText value="MainTabPanel" />
</f:facet>
<rich:tab id="inboxTab" label="Inbox" reRender="displayTabOutputText"></rich:tab>
<rich:tab id="accountTab" label="Account"></rich:tab>
</rich:tabPanel>
</h:form>
</ui:define>
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"/>
</rich:toolBarGroup>
As I'm using seam, that "tabMenuBean" is a seam component.
Any help is appreciated.
Hi,
It seems working. I probably misused reRender before.. Anyway, solved.