0 Replies Latest reply on Oct 7, 2008 3:11 PM by Juan Manuel Diaz

    <a4j:include> issue when it is added programatically

    Juan Manuel Diaz Newbie

      Hi, i am new in this forum..., i am developing an application using jsf, and richfaces. I need to add programatically, tabs (HtmlTab class) to a tab panel (HtmlTabPanel class), each tab must show a jsp page, so i use the include (Include class) to do that... but the new tab has no content...

      This is my code:


      <h:commandButton value="Add New Tab" action="#{informeManager.exploracionManager.crearNuevoFeto}"></h:commandButton>
       <h:commandButton value="Delete Tab" action="#{informeManager.exploracionManager.eliminarFeto}"></h:commandButton>
      <rich:tabPanel id="fetosTabPanel"
       binding="# {informeManager.exploracionManager.fetosTabPanel}"
       <rich:tab name="0" id="fetoTab0" label="Feto único">
       <a4j:include viewId="eco_obstetrica_translucencia_details.jsp"></a4j:include>

      Where fetosTabPanel is an HtmlTabPanel instance setted on a property of exploracionManager. This panel has initially one tab with id "fetoTab0", created in the jsp, and this tab has a <a4j:include> created in the jsp too.

      The idea is to create new tabs with the same include that "fetoTab0".

      This is the code to add new tabs:

       public void crearNuevoFeto(){
       HtmlTab newTab = new HtmlTab();
       newTab.setId("fetoTab" + (this.getFetosTabPanel().getChildCount()));
       Include inc = new Include();

      I read a lot of post about this issue and I try a lot of posible solutions but nothing works propertly, i think that is a good idea to implement this functionality in a future release, because its very usefull to add include tags to tab created programatically,

      Best Regards,
      Juan Manuel