-
1. Re: richFaces tabPanel dynamique
nemeur May 12, 2009 4:25 AM (in response to nemeur)Hello all,
I want to know how to include a page in the tabs (rich: tab) created dynamically from a java code.
I test this piece of code but it gives nothing:
<rich:tabPanel binding="#{tabBean.tabPanel}"/>
CODE JAVA:
public HtmlTabPanel getTabPanel() {
FacesContext context = FacesContext.getCurrentInstance();
Application application = context.getApplication();
tabPanel = (HtmlTabPanel)application.createComponent(HtmlTabPanel.COMPONENT_TYPE);
HtmlTab tab = (HtmlTab)application.createComponent(HtmlTab.COMPONENT_TYPE);
tab.setLabel("Tab 1");
Include include = (Include)application.createComponent(Include.COMPONENT_TYPE);
include.setViewId("maPage.xhtml");
tab.getChildren().add(include);
tabPanel.getChildren().add(tab);
return tabPanel;
}
when I test display, the tabs are built correctly, but the content is empty tabs.
Thank you in advance for your reply. -
2. Re: richFaces tabPanel dynamique
ilya_shaikovsky May 12, 2009 4:30 AM (in response to nemeur)http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230303#4230303
Do not duplicate posts. It will not make things faster ;) -
3. Re: richFaces tabPanel dynamique
ilya_shaikovsky May 12, 2009 4:31 AM (in response to nemeur)and the code you provided should works.
-
4. Re: richFaces tabPanel dynamique
nemeur May 12, 2009 4:53 AM (in response to nemeur)With my code I have no exception (error) and nothing appears in the pages.
I want to know if the setViewiD ( "path") looks much the path of the page to include
thank you. -
5. Re: richFaces tabPanel dynamique
nemeur May 12, 2009 5:53 AM (in response to nemeur)With my code I have no exception (error) and nothing appears in the pages.
I want to know if the setViewiD ( "path") looks much the path of the page to include
thank you. -
6. Re: richFaces tabPanel dynamique
ilya_shaikovsky May 12, 2009 6:35 AM (in response to nemeur)sorry.. really missed one point. include component currently can't be created dynamically. there is already such issue in jira.
-
7. Re: richFaces tabPanel dynamique
nemeur May 12, 2009 8:09 AM (in response to nemeur)Hello,
can you give me the link corresponding JIRA ticket?
Thank you .