5 Replies Latest reply on Aug 8, 2008 1:12 PM by rajevar

    rich:tab inside t:dataDefinitionList ?

    rajevar

      is it possible to include rich:tab inside t:datalist or rich:dataDefinitionList ?

      this is what im trying to do

       <rich:tabPanel switchType="client" styleClass="myTable"
       binding="#{handlerBean.serialTabPane}" id="serialTab">
       <rich:dataDefinitionList var="serial"
       value="#{jobHandlerBean.fibJob.serialList}">
      
       <rich:tab label="#{serial.label}" styleClass="myTabPane" />
       .....
       </rich:tab>
       </rich:dataDefinitionList >
      
      


      if i remove dataDefinitionList , tabs are getting rendered otherwise nothing is displayed on the page. is there any alternate solution ? if can add tabs according to the size of dataList, it makes the development for easier.

      thanks,
      Rajeev

        • 1. Re: rich:tab inside t:dataDefinitionList ?
          rajevar

          im using

          richfaces 3.2.1

          • 2. Re: rich:tab inside t:dataDefinitionList ?
            rajevar

             

            "rajevar" wrote:
            is it possible to include rich:tab inside t:datalist or rich:dataDefinitionList ?

            this is what im trying to do

             <rich:tabPanel switchType="client" styleClass="myTable"
             binding="#{handlerBean.serialTabPane}" id="serialTab">
             <rich:dataDefinitionList var="serial"
             value="#{jobHandlerBean.fibJob.serialList}">
            
             <rich:tab label="#{serial.label}" styleClass="myTabPane" />
             .....
             </rich:tab>
             </rich:dataDefinitionList >
            
            


            if i remove dataDefinitionList , tabs are getting rendered otherwise nothing is displayed on the page. is there any alternate solution ? if can add tabs according to the size of dataList, it makes the development for easier.

            Question : 2
            ------------------

            On button click im dynamically adding tabs to the tabPanel but the new tabs are not added to the right side , its getting added to the left side. I hope im not confusing. Is there any attribute which i can set to append new tabs to the right side of existing tabs

            Thanks,
            Rajeev


            • 3. Re: rich:tab inside t:dataDefinitionList ?
              alexsmirnov

              No, it's not possible for a current version, because each tab expected as a separate TabPanel child component.
              You can use JSTL <c:forEach > tag instead.

              • 4. Re: rich:tab inside t:dataDefinitionList ?
                rajevar

                hi alex, thanks for the reply.

                is it possible to maintain tab order for newly created tabs. I want to order tabs corresponding to creation date, by the way, I'm creating tabs dynamically in the backing bean

                - Rajeev

                • 5. Re: rich:tab inside t:dataDefinitionList ?
                  rajevar

                  hey,

                  i was able to resolve most of my issues by using <c:forEach > inside rich:tabpanel.

                  One more issue tho :-)

                  I have a button to add tabs dynamically to TabPanel and it works good with c:forEach. The issue here is , if i keep on adding new tabs its going off the page width. is it possible to display tabs in new row if it reaches page width ? Hope its clear

                  Thanks,