4 Replies Latest reply on Jan 22, 2009 11:34 AM by tptackab

    Can an a4j:include wizard be restored to it's original viewI

    tptackab

      I have a rich:tab setup on one of my pages. Inside each tab there are "wizards" setup using the a4j:include using a pattern very similar to the RichFaces live demo found here:

      http://livedemo.exadel.com/richfaces-demo/richfaces/include.jsf?c=include&tab=usage

      Just like the demo, all my wizard navigation is performed using navigation entries in faces-config.

      The code to define the tabs on my page (and each wizard child under the tabs) is very similar to the following:

       <rich:tabPanel switchType="ajax">
       <rich:tab label="First Wizard">
       <a4j:keepAlive beanName="firstWizardBean"/>
       <a4j:include viewId="/WEB-INF/wizards/firstWizard.xhtml"/>
       </rich:tab>
       <rich:tab label="Second Wizard">
       <a4j:keepAlive beanName="secondWizardBean"/>
       <a4j:include viewId="/WEB-INF/wizards/secondWizard.xhtml"/>
       </rich:tab>
       </rich:tabPanel>
      


      The wizards work fine; however, I can't figure out how to restore a wizard to it's first "page" (view identified in the a4j:include viewId attribute) if I navigate away from one wizard in the middle of the wizard's flow by clicking on another tab, and then return to the original wizard by clicking on it's tab.

      For example, if I'm on the second page of "First Wizard" click the "Second Wizard" tab, and then navigate back to the original wizard by clicking on the "First Wizard" tab, the First Wizard is still on the second page of the wizard. I would like any click on the tabs to restore it's child wizard back to it's original view (the view identified in the a4j:include viewId attribute).

      It that possible?

      Thanks,
      Tom