Details
-
Type:
Feature Request
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.0.0.CR1
-
Fix Version/s: 3.1.0.Tracking
-
Component/s: CDI Integration
-
Labels:None
-
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) { |
...
|
}
|
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.