Save This Page
Home » mojarra-1.2_09-b02-FCS-source » javax.faces.component » [javadoc | source]
javax.faces.component
public class: UIViewRoot [javadoc | source]
java.lang.Object
   javax.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:

Take the following action regarding PhaseListeners.

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 createUniqueId() method. 

Fields inherited from javax.faces.component.UIComponent:
attributesThatAreSet,  bindings
Constructor:
 public UIViewRoot() 
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 javax.faces.component.UIComponentBase:
addFacesListener,   broadcast,   decode,   encodeBegin,   encodeChildren,   encodeEnd,   findComponent,   getAttributes,   getChildCount,   getChildren,   getClientId,   getDescriptorMap,   getFacesContext,   getFacesListeners,   getFacet,   getFacetCount,   getFacets,   getFacetsAndChildren,   getId,   getParent,   getRenderer,   getRendererType,   getRendersChildren,   getValueBinding,   invokeOnComponent,   isRendered,   isTransient,   processDecodes,   processRestoreState,   processSaveState,   processUpdates,   processValidators,   queueEvent,   removeFacesListener,   restoreAttachedState,   restoreState,   saveAttachedState,   saveState,   setId,   setParent,   setRendered,   setRendererType,   setTransient,   setValueBinding
Methods from javax.faces.component.UIComponent:
addFacesListener,   broadcast,   decode,   encodeAll,   encodeBegin,   encodeChildren,   encodeEnd,   findComponent,   getAttributes,   getAttributesThatAreSet,   getChildCount,   getChildren,   getClientId,   getContainerClientId,   getFacesContext,   getFacesListeners,   getFacet,   getFacetCount,   getFacets,   getFacetsAndChildren,   getFamily,   getId,   getParent,   getRenderer,   getRendererType,   getRendersChildren,   getValueBinding,   getValueExpression,   invokeOnComponent,   isRendered,   processDecodes,   processRestoreState,   processSaveState,   processUpdates,   processValidators,   queueEvent,   removeFacesListener,   setId,   setParent,   setRendered,   setRendererType,   setValueBinding,   setValueExpression
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.faces.component.UIViewRoot Detail:
 public  void addPhaseListener(PhaseListener newPhaseListener) 
 public String createUniqueId() 

    Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique within this UIViewRoot.

 public  void encodeBegin(FacesContext context) throws IOException 
 public  void encodeEnd(FacesContext context) throws IOException 
 public MethodExpression getAfterPhaseListener() 
 public MethodExpression getBeforePhaseListener() 
 public String getFamily() 
 public Locale getLocale() 

    Return the Locale to be used in localizing the response being created for this view.

    Algorithm:

    If we have a locale ivar, return it. If we have a value expression for "locale", get its value. If the value is null, return the result of calling javax.faces.application.ViewHandler#calculateLocale . If the value is an instance of java.util.Locale return it. If the value is a String, convert it to a java.util.Locale and return it. If there is no value expression for "locale", return the result of calling javax.faces.application.ViewHandler#calculateLocale .

 public String getRenderKitId() 
 public String getViewId() 

    Return the view identifier for this view.

 public  void processApplication(FacesContext context) 
 public  void processDecodes(FacesContext context) 
 public  void processUpdates(FacesContext context) 
 public  void processValidators(FacesContext context) 
 public  void queueEvent(FacesEvent event) 
 public  void removePhaseListener(PhaseListener toRemove) 
 public  void restoreState(FacesContext context,
    Object state) 
 public Object saveState(FacesContext context) 
 public  void setAfterPhaseListener(MethodExpression newAfterPhase) 

    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 .

 public  void setBeforePhaseListener(MethodExpression newBeforePhase) 

    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 .

 public  void setLocale(Locale locale) 

    Set the Locale to be used in localizing the response being created for this view.

 public  void setRenderKitId(String renderKitId) 

    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.

 public  void setViewId(String viewId) 

    Set the view identifier for this view.