3 Replies Latest reply on Sep 4, 2008 1:03 PM by Rajeev Ravindran

    issue with dynamic tabs

    Rajeev Ravindran Newbie


      I have this code for adding tabs dynamically and its working good.

       <c:forEach items="#{rmaJobHandlerBean.currentJob.serialList}"
       <rich:tab label="#{serial.serialNumber == null ?
       'New' : serial.serialNumber }" styleClass="myTabPane"
       labelWidth="#{fadbUtil.labelWidth}" >

      I have a button to add new Tabs and in the action event i will add a new object to the Serial List which will get reflected as new tab in TabPanel

      My issues are

      1) i want the newly added tab to be the selected one. I tried different ways but all in vain. i dont want to make it too complicated by adding a phaseListener. Anyone has faced this issue , any suggestions/help ?

      2) if i keep on adding new tabs ( suppose i added 20 tabs dynamically ), tabs are displaying off the page. is it possible to display tabs in new row if it exceeds the page width or anything like that ?

      Appreciate any help on this.