java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIViewRoot
All Implemented Interfaces:
StateHolder
UIViewRoot is the UIComponent that represents the root of the UIComponent tree. This component has no rendering, it just serves as the root of the component tree, and as a place to hang per-view PhaseListener s.
For each of the following lifecycle phase methods:
RenderResponse, via #encodeBegin and #encodeEnd
Take the following action regarding
PhaseListeners.
Initialize a state flag to false.
If #getBeforePhaseListener returns non-null,
invoke the listener, passing in the correct corresponding PhaseId for this phase.
Upon return from the listener, call FacesContext#getResponseComplete and FacesContext#getRenderResponse . If either return true
set the internal state flag to true.
If or one or more listeners have been added by a call to #addPhaseListener , invoke the beforePhase method on
each one whose PhaseListener#getPhaseId matches the current
phaseId, passing in the same PhaseId as in the previous
step.
Upon return from each listener, call FacesContext#getResponseComplete and FacesContext#getRenderResponse . If either return true
set the internal state flag to true.
Execute any processing for this phase if the internal state flag was not set.
If #getAfterPhaseListener returns non-null,
invoke the listener, passing in the correct corresponding PhaseId for this phase.
If or one or more listeners have been added by a call to #addPhaseListener , invoke the afterPhase method on each
one whose PhaseListener#getPhaseId matches the current
phaseId, passing in the same PhaseId as in the previous
step.
| Field Summary | ||
|---|---|---|
| public static final String | COMPONENT_TYPE | The standard component type for this component. |
| public static final String | COMPONENT_FAMILY | The standard component family for this component. |
| public static final String | UNIQUE_ID_PREFIX | The prefix that will be used for identifiers generated
by the |
| Fields inherited from javax.faces.component.UIComponent: |
|---|
| attributesThatAreSet, bindings |
| Constructor: |
|---|
Create a new UIViewRoot instance with default property values. |
| Method from javax.faces.component.UIViewRoot Summary: |
|---|
| addPhaseListener, createUniqueId, encodeBegin, encodeEnd, getAfterPhaseListener, getBeforePhaseListener, getFamily, getLocale, getRenderKitId, getViewId, processApplication, processDecodes, processUpdates, processValidators, queueEvent, removePhaseListener, restoreState, saveState, setAfterPhaseListener, setBeforePhaseListener, setLocale, setRenderKitId, setViewId |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from javax.faces.component.UIViewRoot Detail: |
|---|
|
Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique within this UIViewRoot. |
Override the default UIComponentBase#encodeBegin
behavior. If
#getBeforePhaseListener returns non- |
Override the default UIComponentBase#encodeEnd
behavior. If #getAfterPhaseListener returns
non- |
|
|
|
Return the Algorithm: If we have a |
Return the render kit identifier of the RenderKit
associated with this view. Unless explicitly set, as in javax.faces.application.ViewHandler#createView , the returned
value will be |
Return the view identifier for this view. |
Broadcast any events that have been queued for the Invoke Application phase of the request processing lifecycle and to clear out any events for later phases if the event processing for this phase caused FacesContext#renderResponse or FacesContext#responseComplete to be called. |
Override the default UIComponentBase#processDecodes behavior to broadcast any queued events after the default processing has been completed and to clear out any events for later phases if the event processing for this phase caused FacesContext#renderResponse or FacesContext#responseComplete to be called. |
Override the default UIComponentBase behavior to broadcast any queued events after the default processing has been completed and to clear out any events for later phases if the event processing for this phase caused FacesContext#renderResponse or FacesContext#responseComplete to be called. |
Override the default UIComponentBase#processValidators behavior to broadcast any queued events after the default processing has been completed and to clear out any events for later phases if the event processing for this phase caused FacesContext#renderResponse or FacesContext#responseComplete to be called. |
Override the default UIComponentBase#queueEvent behavior to accumulate the queued events for later broadcasting. |
|
|
|
Allow an arbitrary method to be called for the "afterPhase" event as the UIViewRoot runs through its lifecycle. This method will be called for all phases except PhaseId#RESTORE_VIEW . Unlike a true PhaseListener , this approach doesn't allow for only receiving PhaseEvent s for a given phase. The method must conform to the signature of PhaseListener#afterPhase . |
Allow an arbitrary method to be called for the "beforePhase" event as the UIViewRoot runs through its lifecycle. This method will be called for all phases except PhaseId#RESTORE_VIEW . Unlike a true PhaseListener , this approach doesn't allow for only receiving PhaseEvent s for a given phase. The method must conform to the signature of PhaseListener#beforePhase . |
Set the |
Set the render kit identifier of the RenderKit associated with this view. This method may be called at any time between the end of Apply Request Values phase of the request processing lifecycle (i.e. when events are being broadcast) and the beginning of the Render Response phase. |
Set the view identifier for this view. |