|
||||||||||
| 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
public class UIViewRoot
Creates 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 Javadoc of JSF Specification
| Field Summary | |
|---|---|
static String |
COMPONENT_FAMILY
|
static String |
COMPONENT_TYPE
|
static String |
UNIQUE_ID_PREFIX
|
| Constructor Summary | |
|---|---|
UIViewRoot()
|
|
| Method Summary | |
|---|---|
String |
createUniqueId()
Provides a unique id for this component instance. |
void |
encodeBegin(FacesContext context)
|
String |
getClientId(FacesContext context)
DO NOT USE. |
String |
getFamily()
|
String |
getId()
An identifier for this particular component instance within a component view. |
Locale |
getLocale()
The locale of this view. |
String |
getRenderKitId()
Defines what renderkit should be used to render this view. |
String |
getViewId()
|
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 |
restoreState(FacesContext context,
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 context)
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 |
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, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding |
| 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 String getViewId()
public void setViewId(String viewId)
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 UIComponentBaseIOExceptionpublic String createUniqueId()
public Locale getLocale()
public void setLocale(Locale locale)
public String getFamily()
getFamily in class UIComponentpublic String getRenderKitId()
Note that in JSF1.1 this property cannot be set via the f:view tag (this is possible in JSF1.2).
public void setRenderKitId(String renderKitId)
public void setRendered(boolean state)
Although this class extends a base-class that defines a read/write rendered property, it makes no sense for this particular subclass to support it. Yes, this is broken OO design: direct all complaints to the JSF spec group.
Ideally this method would throw an UnsupportedOperationException when invoked. Unfortunately, the JSF TCK calls this method, so instead we just pass on the call to the default inherited implementation.
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()
UIComponentBaseThe id must be unique within the scope of the tag's enclosing NamingContainer (eg h:form or f:subview). The id is not necessarily unique across all components in the current view
This value must be a static value, ie not change over the lifetime of a component. It cannot be defined via an EL expression; only a string is permitted.
getId in class UIComponentBasepublic String getClientId(FacesContext context)
As this component has no "id" property, it has no clientId property either.
Ideally, this method would just return null when called (or even throw an exception) Unforunately, the TCK invokes it so we just invoke the interited implementation instead.
getClientId in class UIComponentBasepublic Object saveState(FacesContext context)
UIComponentBase
saveState in interface StateHoldersaveState in class UIComponentBase
public void restoreState(FacesContext context,
Object state)
UIComponentBase
restoreState in interface StateHolderrestoreState in class UIComponentBasestate - is an object previously returned by
the saveState method of this class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||