This content has been marked as final.
Show 1 reply
-
1. Re: rich:tab label facet
ilya_shaikovsky Oct 2, 2007 8:05 AM (in response to rhardy5014)My simple example:
<rich:tabPanel switchType="ajax" id="tab"> <rich:tab label="test 1" name="tab1" action="#{bean.action}"> <ui:include src="/pages/greeting1.xhtml" /> <a4j:commandButton value="next" reRender="tab" action="#{bean.nextTab}"></a4j:commandButton> </rich:tab> <rich:tab name="tab2" action="#{bean.action}" rendered="#{not bean.check}"> <f:facet name="label"> <h:panelGroup> <h:graphicImage value="/pages/texas.gif" onclick="Event.stop(event); doHide();" /> </h:panelGroup> </f:facet> <h:form> <ui:include src="/pages/greeting1.xhtml" /> <a4j:commandButton value="prev" reRender="tab" action="#{bean.prevTab}"></a4j:commandButton> </h:form> </rich:tab> </rich:tabPanel> <a4j:jsFunction name="doHide" action="#{bean.toggleCheck}" reRender="tab"/>
check - boolean varible and toggleCheck - inverts the check value.
Pay your attention toonclick="Event.stop(event); doHide();"
This stops the tabChange event on the tab itself.