|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIViewRoot
@JSFComponent(name="f:view",
bodyContent="JSP",
tagClass="org.apache.myfaces.taglib.core.ViewTag")
@JSFJspProperty(name="binding",
returnType="java.lang.String",
tagExcluded=true)
public class UIViewRootCreates a JSF View, which is a container that holds all of the components that are part of the view.
Unless otherwise specified, all attributes accept static values or EL expressions.
See the javadoc for this class in the JSF Specification for further details.
| Field Summary | |
|---|---|
static String |
COMPONENT_FAMILY
|
static String |
COMPONENT_TYPE
|
static String |
UNIQUE_ID_PREFIX
|
| Fields inherited from class javax.faces.component.UIComponent |
|---|
bindings |
| Constructor Summary | |
|---|---|
UIViewRoot()
Construct an instance of the UIViewRoot. |
|
| Method Summary | |
|---|---|
void |
addPhaseListener(PhaseListener phaseListener)
Adds a The phaseListeners attached to ViewRoot. |
String |
createUniqueId()
Provides a unique id for this component instance. |
void |
encodeBegin(FacesContext context)
|
void |
encodeEnd(FacesContext context)
|
javax.el.MethodExpression |
getAfterPhaseListener()
MethodBinding pointing to a method that takes a javax.faces.event.PhaseEvent and returns void, called after every phase except for restore view. |
javax.el.MethodExpression |
getBeforePhaseListener()
MethodBinding pointing to a method that takes a javax.faces.event.PhaseEvent and returns void, called before every phase except for restore view. |
String |
getClientId(FacesContext context)
DO NOT USE. |
String |
getFamily()
|
String |
getId()
Get a string which uniquely identifies this UIComponent within the scope of the nearest ancestor NamingContainer component. |
Locale |
getLocale()
The locale for this view. |
String |
getRenderKitId()
Defines what renderkit should be used to render this view. |
String |
getViewId()
A unique identifier for the "template" from which this view was generated. |
boolean |
isRendered()
A boolean value that indicates whether this component should be rendered. |
void |
processApplication(FacesContext context)
|
void |
processDecodes(FacesContext context)
|
void |
processUpdates(FacesContext context)
This isn't an input component, so just pass on the processUpdates call to child components and facets that might be input components. |
void |
processValidators(FacesContext context)
|
void |
queueEvent(FacesEvent event)
|
void |
removePhaseListener(PhaseListener phaseListener)
Removes a The phaseListeners attached to ViewRoot. |
void |
restoreState(FacesContext facesContext,
Object state)
Invoked in the "restore view" phase, this initialises this object's members from the values saved previously into the provided state object. |
Object |
saveState(FacesContext facesContext)
Invoked after the render phase has completed, this method returns an object which can be passed to the restoreState of some other instance of UIComponentBase to reset that object's state to the same values as this object currently has. |
void |
setAfterPhaseListener(javax.el.MethodExpression afterPhaseListener)
Sets |
void |
setBeforePhaseListener(javax.el.MethodExpression beforePhaseListener)
Sets |
void |
setId(String id)
DO NOT USE. |
void |
setLocale(Locale locale)
|
void |
setRendered(boolean state)
DO NOT USE. |
void |
setRenderKitId(String renderKitId)
|
void |
setViewId(String viewId)
|
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addFacesListener, broadcast, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public static final String UNIQUE_ID_PREFIX
| Constructor Detail |
|---|
public UIViewRoot()
| Method Detail |
|---|
public void queueEvent(FacesEvent event)
queueEvent in class UIComponentBasepublic void processDecodes(FacesContext context)
processDecodes in class UIComponentBasepublic void processValidators(FacesContext context)
processValidators in class UIComponentBasepublic void processUpdates(FacesContext context)
UIComponentBaseComponents that were never rendered can't possibly be receiving update data (no corresponding fields were ever put into the response) so if this component is not rendered then this method does not invoke processUpdates on its children.
processUpdates in class UIComponentBasepublic void processApplication(FacesContext context)
public void encodeBegin(FacesContext context)
throws IOException
encodeBegin in class UIComponentBaseIOException
public void encodeEnd(FacesContext context)
throws IOException
encodeEnd in class UIComponentBaseIOExceptionpublic String createUniqueId()
@JSFProperty public Locale getLocale()
Defaults to the default locale specified in the faces configuration file.
public void setLocale(Locale locale)
@JSFProperty public String getRenderKitId()
public void setRenderKitId(String renderKitId)
@JSFProperty(tagExcluded=true) public void setRendered(boolean state)
This inherited property is disabled. Although this class extends a base-class that defines a read/write rendered property, this particular subclass does not support setting it. Yes, this is broken OO design: direct all complaints to the JSF spec group.
setRendered in class UIComponentBasepublic boolean isRendered()
UIComponentBase
isRendered in class UIComponentBasepublic void setId(String id)
Although this class extends a base-class that defines a read/write id property, it makes no sense for this particular subclass to support it. The tag library does not export this property for use, but there is no way to "undeclare" a java method. Yes, this is broken OO design: direct all complaints to the JSF spec group.
This property should be disabled (ie throw an exception if invoked). However there are currently several places that call this method (eg during restoreState) so it just does the normal thing for the moment. TODO: fix callers then make this throw an exception.
setId in class UIComponentBasepublic String getId()
UIComponentBase
getId in class UIComponentBasepublic String getClientId(FacesContext context)
As this component has no "id" property, it has no clientId property either.
getClientId in class UIComponentBase@JSFProperty(tagExcluded=true) public String getViewId()
Typically this is the filesystem path to the template file, but the exact details are the responsibility of the current ViewHandler implementation.
public void setViewId(String viewId)
public void addPhaseListener(PhaseListener phaseListener)
public void removePhaseListener(PhaseListener phaseListener)
@JSFProperty(stateHolder=true,
returnSignature="void",
methodSignature="javax.faces.event.PhaseEvent",
jspName="beforePhase")
public javax.el.MethodExpression getBeforePhaseListener()
public void setBeforePhaseListener(javax.el.MethodExpression beforePhaseListener)
beforePhaseListener - the new beforePhaseListener value
@JSFProperty(stateHolder=true,
returnSignature="void",
methodSignature="javax.faces.event.PhaseEvent",
jspName="afterPhase")
public javax.el.MethodExpression getAfterPhaseListener()
public void setAfterPhaseListener(javax.el.MethodExpression afterPhaseListener)
afterPhaseListener - the new afterPhaseListener valuepublic Object saveState(FacesContext facesContext)
UIComponentBase
saveState in interface StateHoldersaveState in class UIComponentBase
public void restoreState(FacesContext facesContext,
Object state)
UIComponentBase
restoreState in interface StateHolderrestoreState in class UIComponentBasestate - is an object previously returned by
the saveState method of this class.public String getFamily()
getFamily in class UIComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||