You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Gilles Doffe <Gi...@groupe-asten.fr> on 2005/09/30 15:45:22 UTC
RE Adding a panelTab to a panelTabbedPane
I just found the solution !
1) bind the tabbedpane to your bean : <x:panelTabbedPane
binding="#{yourbean.tabbedPane}" > </x:panelTabbedPane>
2) make an init function called by the constructor of your bean :
private void initTabbedPane() {
// New tabbedPane
tabbedPane = new HtmlPanelTabbedPane();
// Your panelTabs
HtmlPanelTab tab0 = new HtmlPanelTab();
tab0.setLabel("Je suis tab0");
HtmlPanelTab tab1 = new HtmlPanelTab();
tab1.setLabel("Je suis tab1");
// Just get the list of children to add it your own
panelTabs
List children = tabbedPane.getChildren();
children.add(tab0);
children.add(tab1);
}
Thanks
Bye
Gilles