4 Replies Latest reply on Jul 29, 2010 4:32 AM by Jethro Borsje

    Page Scope inside a4j:include

    Jethro Borsje Newbie

      Hi all,


      In my project I have a menu.xhtml which shows the menu build using RichFaces components. If I click on a menu item a URL is set on a Seam SESSION scoped component. After this I reRender an a4j:include which shows the selected URL:


      <a4j:include id="content" viewId="#{navigationBean.url}" />


      The page which I include here (let's call it page A) is backed by a PAGE scoped Seam component. After displaying page A I click on another menu item (let's say for page B) which results in page B being shown. If I now click on the menu item for page A again the PAGE scoped backing bean for page A is not recreated, i.e. its @Create method is not called.


      I suspect this happens because using a4j:include does not cause JSF page navigation, therefor the PAGE scoped Seam component stays 'alive'. Is this correct? And if so: how should I use the PAGE scoped component in my case?


      Best regards,
      Jethro