-
1. Re: tabPanel: Controlling the switching between the tabs.
tirupathineela Feb 16, 2009 3:43 AM (in response to hlucke)Hi hlucke!
If you use rich:tab, you see one rich:tab defaultly without switching to another. -
2. Re: tabPanel: Controlling the switching between the tabs.
fmarwede Feb 16, 2009 4:54 AM (in response to hlucke)i will check the contents of the tabs before the switching to an other tab. The action-method of the tab or the validate-method of the tabPanel don't working. What i make wrong?
Hi Harald,
please describe more precisly, what content do you wanna check and give us a code snippet please. Otherwise it is difficult to say what could be wrong.
Greetings,
Florian -
3. Re: tabPanel: Controlling the switching between the tabs.
nbelaevski Feb 16, 2009 5:02 AM (in response to hlucke)Hello,
Please post your code. -
4. Re: tabPanel: Controlling the switching between the tabs.
hlucke Feb 16, 2009 5:54 AM (in response to hlucke)Hi,
in the following the code of the main side:
<f:view>
<h:form id="BaGB" styleClass="mainForm">
<rich:tabPanel id="tabPanel01" switchType="server"
binding="#{Main.tabPanel}"
selectedTab="tabPanel01_tab01"
validator="#{Main.validate}">
<rich:tab id="tabPanel01_tab01" label="#{msg.tab1}"
disabled="#{Main.tabenabled1}"
action="#{Requirements.validate}" immediate="true">
<ui:include src="/requirements.xhtml" />
</rich:tab>
....
....
</rich:tabPanel>
</h:form>
</f:view>
and here is as example the code of one inluded page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich" >
#{msg.Confirmation_Title}
<rich:calendar popup="true" value="#{Requirements.startDate}"
enableManualInput="true" datePattern="#
{msg.date_pattern}">
<f:convertDateTime pattern="dd/MM/yy" type="date" />
</rich:calendar>
.....
....
#{msg.Confirmation_text20}
All other pages are similarly.
I want to check the contents of every side, before a new side becomes jumped. For the examination I want to use no validatoren or similar, but a own function in a ManagedBean.
As a function of the result the new side should be placed or not.
Thank you for yours help, Harald. -
5. Re: tabPanel: Controlling the switching between the tabs.
nbelaevski Feb 16, 2009 10:29 AM (in response to hlucke)Harald,
Use this:<rich:tabPanel selectedTab="#{bean.selectedTabName}">
to control which tab is opened.