Details

    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Estimated Difficulty:
      Low

      Description

      Add producer for UIViewRoot so that it can be injected. It should be dependent-scoped as it may change at any time during the request lifecycle.

      Injected into an object:

      @Inject Instance<UIViewRoot> viewRootProvider;
      

      or into an observer:

      public void beforeRender(@Observes @Before @RenderResponse PhaseEvent e, UIViewRoot viewRoot) {
         ...
      }
      

        Gliffy Diagrams

          Activity

          Hide
          bleathem Brian Leathem added a comment -

          This seems dangerous to me, as Injecting a dependent-scoped UIViewRoot into an application-scoped or session-scoped bean would mean that the injected UIViewRoot would quickly become stale.

          Show
          bleathem Brian Leathem added a comment - This seems dangerous to me, as Injecting a dependent-scoped UIViewRoot into an application-scoped or session-scoped bean would mean that the injected UIViewRoot would quickly become stale.
          Hide
          dan.j.allen Dan Allen added a comment -

          That's no different than some of the other producers we have. This is just a case where we have to document that it should be injected as a method parameter (short-lived) or using the Instance<UIViewRoot> SPI.

          Show
          dan.j.allen Dan Allen added a comment - That's no different than some of the other producers we have. This is just a case where we have to document that it should be injected as a method parameter (short-lived) or using the Instance<UIViewRoot> SPI.
          Hide
          dan.j.allen Dan Allen added a comment -

          Which I see I mentioned in the description already

          Show
          dan.j.allen Dan Allen added a comment - Which I see I mentioned in the description already
          Hide
          bleathem Brian Leathem added a comment -

          I love working on Seam Faces! Every time I look at something new, I learn more about CDI.
          http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/Instance.html

          Show
          bleathem Brian Leathem added a comment - I love working on Seam Faces! Every time I look at something new, I learn more about CDI. http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/Instance.html

            People

            • Assignee:
              Unassigned
              Reporter:
              dan.j.allen Dan Allen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development