Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2-b02
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,383

      Description

      I am trying to find a JSF2 event that is fired AFTER the component tree has
      been fully recreated but BEFORE it has been serialized. This is so that I can
      safely modify the component tree (ie. to add dynamic components).

      Apparently the right event to use for this is PostAddToView, but the current
      Mojarra implementation fires it at slightly the wrong time.

      Original e-mail discussion follows:

      Ken:

      "I looked into the PostAddToView event. It looked promising. However, even
      though it is fired for the UIViewRoot, I don't think JSF creates the view in
      createView (although JSFTemplating does)"

      Ryan:

      "I just checked the source and that event is fired after the UIViewRoot has
      been created, however that seems too early.
      I'm guessing it's an artifact of when the view was fully created in either the
      get or post-back cases within the restore view phase.

      While that logic was changed, the event logic didn't get moved.

      Could you please log an issue?"

        Activity

        Hide
        kennardconsulting added a comment -

        Ryan,

        I completely agree with your reply. It is a complex issue and I don't have a
        good answer.

        I guess my high-level feeling is that Metawidget (http://metawidget.org) is a
        really good example of exactly the kind of highly dynamic component that led to
        the inception of events such as PostAddToViewEvent in JSF2: it was recognised
        JSF needed a 'safe' place to manipulate the component tree. But perhaps what
        was NOT recognised was that if that 'safe' place was via an event model, and
        there was not a safe place to manipulate the event model itself, then you could
        never have dynamic components that generated other dynamic components.

        My option 2 in my previous comment was understating the case: it doesn't have
        to be a dynamic component that creates an instance of itself. It will be any
        dynamic component that in turn tries to create another dynamic component.

        I'll think about it some more too...

        Show
        kennardconsulting added a comment - Ryan, I completely agree with your reply. It is a complex issue and I don't have a good answer. I guess my high-level feeling is that Metawidget ( http://metawidget.org ) is a really good example of exactly the kind of highly dynamic component that led to the inception of events such as PostAddToViewEvent in JSF2: it was recognised JSF needed a 'safe' place to manipulate the component tree. But perhaps what was NOT recognised was that if that 'safe' place was via an event model, and there was not a safe place to manipulate the event model itself, then you could never have dynamic components that generated other dynamic components. My option 2 in my previous comment was understating the case: it doesn't have to be a dynamic component that creates an instance of itself. It will be any dynamic component that in turn tries to create another dynamic component. I'll think about it some more too...
        Hide
        Ryan Lubke added a comment -

        I'd like to move issue 2 to a new issue. I believe at this point, the original
        bug is indeed resolved. If you agree, I will log the issue (cc'ing you of
        course) and we can work from there.

        Show
        Ryan Lubke added a comment - I'd like to move issue 2 to a new issue. I believe at this point, the original bug is indeed resolved. If you agree, I will log the issue (cc'ing you of course) and we can work from there.
        Hide
        kennardconsulting added a comment -

        Agreed. Sounds good.

        Show
        kennardconsulting added a comment - Agreed. Sounds good.
        Hide
        Ryan Lubke added a comment -

        Initial issue is resolved. Moved issue 2 as described below to issue 1402.

        Show
        Ryan Lubke added a comment - Initial issue is resolved. Moved issue 2 as described below to issue 1402.
        Hide
        Manfred Riem added a comment -

        Closing out resolved issue

        Show
        Manfred Riem added a comment - Closing out resolved issue

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            kennardconsulting
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: