3 Replies Latest reply on Apr 30, 2009 7:39 PM by nbelaevski

    tabPanel Issue


      We have a simple rich:tabPanel with 3 tabs (using a4j:include). Unfortunately data for all 3 tabs is loaded on startup, on editing any table row and so on.

      <rich:tabPanel id="tabs" switchType="ajax" selectedTab="t1">
      <rich:tab id="t1" label="T1">
      <a4j:include viewId="/M1List.xhtml"/>
      <rich:tab id="t2" label="T2">
      <a4j:include viewId="/M2List.xhtml"/>
      <rich:tab id="t3" label="T3">
      <a4j:include viewId="/M3List.xhtml"/>


      Is there any way to prevent this? This seems to be a real show stopper?

      Thanks for your support

        • 1. Re: tabPanel Issue

          Hello Ganesh,

          a4j:include creates components tree for all tabs, not just for the one being rendered. You can work around that by making dynamic viewId:

          and refer to the blank views for tabs that are not the current one.

          • 2. Re: tabPanel Issue

            Thanks for this response...

            But at some point if the user clicks the second tab, then viewId of first tab will have to be reset. This means if the user clicks the first tab after clicking the other tabs, data will have to be refetched.

            Is there no other way to have dynamic tab content?


            • 3. Re: tabPanel Issue

              You can make client-mode tabs empty by default and use a4j:support that will track tabs switches and load data.