1 Reply Latest reply on Aug 5, 2013 7:19 AM by jorelia64

    Tab Panel backing bean isolation / attach data on tab / Bean initialization?

    jorelia64

      We have 2 TabPanels. The first one is in "ajax" switch and the second is a nested tab in switch "server" because of RF-17763.

      For each tab from the first tabPanel, we create the same nested TabPanel but with different data.

       

      For example, here is the basic structure we get at the final stage

              <TabPanel>

                     <Tab1>

                          <subView id="sb1">

                               <TabPanel id="Client">

                                    <Tab1 id="Phones">

                                    </Tab>

                                    <Tab2 id="Addresses">

                                    </Tab>

                               </TabPanel>

                          <subView>

                     </Tab1>

                     <Tab2>

                          <subView id="sb2">

                               <TabPanel id="Client">

                                    <Tab1 id="Phones">

                                    </Tab>

                                    <Tab2 id="Addresses">

                                    </Tab>

                               </TabPanel>

                          <subView>

                     </Tab2>

              </TabPanel>

       

      In this context, several questions is risen :

        1) Is there a way to avoid backing-bean creation for non-active tab ?

        2) Is there a reliable way to attach data on backing bean on the fly, I mean upon the tab selection.

        3) As it exist several occurences of the same XHTML and so, also backing-bean, it there a way to enclosed backing per tab?

        4) Is there a way to initialize a bean based on the context

       

      Moreover, in our case, the tabs and their content are dynamically created (c:forEach, subView and ui:include).

       

      To make a summary, how to isolate the tabs that uses the same controller from each other and how to attach the correct data?

       

      Thank you very much.