1 Reply Latest reply on Apr 28, 2010 5:03 AM by ilya_shaikovsky

    rich tree holds old component ids after page change

    mglowacki

      hi,

       

        I got situation where I have two pages with rich tree. My trees represents categories and work in ajax mode - clicking on the leaf re-renders tables. I have a problem with such scenario:

       

      Page A - I use tree, expand node, click leaf and trigger rerendering corresponding datatable enclosed in form with id 'myForm'

       

      I go to Page B, my trees are binded to session scoped bean (I use seam) to not loose state etc.

       

      At Page B i try to expand node, click leaf, console shows error:

       

      WARN  [AjaxContext] Target component for id myForm not found.

       

       

      I need to reload the page B in order to make it work properly. Bug?

        • 1. Re: rich tree holds old component ids after page change
          ilya_shaikovsky

          In JSF - component instances should not be stored in session scope. Them should be recreated every request. State should be stored by using attributes bingings and the way depends on component. Session scoped binding could cause many problems and this is not related to RichFaces but just common JSF problem dsicussed many times there and around the web.