3 Replies Latest reply on Sep 3, 2012 11:00 AM by Logan M

    [RF 4.1.0] EL evaluation of non-rendered component during render phase

    Logan M Newbie

      Hi,

       

       

      My problem is very simple. I have a complex component breakdown which each level has a render condition. So, child components assume the rendering condition of their parents are true. For example, the book details assumes a book has been chosen.

       

      However, child ELs are evaluated and causes exceptions due to an uninitiliazed state of my backing beans. For example, getting book details whereas book haven't been chosen results in a NullPointerException.

       

       

      Debugging the RF codes, I find ExtendedPartialViewContextImpl#processPartialRenderPhase invokes ExtendedPartialViewContextImpl#visitActivatorAtRender. This last one launch visit tree using no VisitHint and ExecuteExtendedVisitContext instead of RenderExtendedVisitContext (cf. ExtendedPartialViewContextImpl#visitActivatorComponent).

       

      My question are :

      • Are there any workaround to avoid this behaviour ?
      • Can I fix the problem using VisitHint.SKIP_UNREDERED, without introducing a new bug (Side Effect) ?
      • Can I fix the problem using RenderExtendedVisitContext (with same conditions) ?
      • Are there any other solutions ?
      • Which behaviour/feature is covered/handled by ExtendedPartialViewContextImpl#visitActivatorAtRender ?

       

       

      Thanks in advance for any help.