0 Replies Latest reply on May 12, 2009 4:13 AM by nemeur

    richFaces tabPanel dynamique

      Bonjour,

      je voudrai savoir comment inclure une page dans des onglets (rich:tab) crées dynamiquement depuis un code java .

      j'ai essai avec ce bout de code mais ça donne rien :

      <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;
      }

      lorsque j'ai essai d'afficher, les onglets se construise correctement mais le contenu des onglets est vide.
      par avance merci de votre réponse.