|
||||||||||
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 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 the javadoc for this class in the JSF Specification for further details.
Field Summary | |
---|---|
static String |
COMPONENT_FAMILY
|
static String |
COMPONENT_TYPE
|
static String |
METADATA_FACET_NAME
|
static String |
UNIQUE_ID_PREFIX
|
static String |
VIEW_PARAMETERS_KEY
|
Fields inherited from class javax.faces.component.UIComponent |
---|
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY |
Constructor Summary | |
---|---|
UIViewRoot()
Construct an instance of the UIViewRoot. |
Method Summary | |
---|---|
void |
addComponentResource(FacesContext context,
UIComponent componentResource)
|
void |
addComponentResource(FacesContext context,
UIComponent componentResource,
String target)
|
void |
addPhaseListener(PhaseListener phaseListener)
Adds a The phaseListeners attached to ViewRoot. |
void |
broadcastEvents(FacesContext context,
PhaseId phaseId)
|
String |
createUniqueId()
Provides a unique id for this component instance. |
String |
createUniqueId(FacesContext context,
String seed)
|
void |
encodeBegin(FacesContext context)
|
void |
encodeChildren(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. |
List<UIComponent> |
getComponentResources(FacesContext context,
String target)
|
String |
getFamily()
|
Locale |
getLocale()
The locale for this view. |
List<PhaseListener> |
getPhaseListeners()
|
String |
getRenderKitId()
Defines what renderkit should be used to render this view. |
boolean |
getRendersChildren()
Indicates whether this component or its renderer manages the invocation of the rendering methods of its child components. |
String |
getViewId()
A unique identifier for the "template" from which this view was generated. |
List<SystemEventListener> |
getViewListenersForEventClass(Class<? extends SystemEvent> systemEvent)
|
Map<String,Object> |
getViewMap()
|
Map<String,Object> |
getViewMap(boolean create)
|
boolean |
isInView()
Indicate if this component is inside a view, or in other words is contained by an UIViewRoot instance (which represents the view). |
void |
processApplication(FacesContext context)
|
void |
processDecodes(FacesContext context)
|
void |
processRestoreState(FacesContext context,
Object state)
|
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 |
removeComponentResource(FacesContext context,
UIComponent componentResource)
|
void |
removeComponentResource(FacesContext context,
UIComponent componentResource,
String target)
|
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 |
setInView(boolean isInView)
Define if the component is on the view or not. |
void |
setLocale(Locale locale)
|
void |
setRendered(boolean state)
DO NOT USE. |
void |
setRenderKitId(String renderKitId)
|
void |
setViewId(String viewId)
|
void |
subscribeToViewEvent(Class<? extends SystemEvent> systemEvent,
SystemEventListener listener)
|
void |
unsubscribeFromViewEvent(Class<? extends SystemEvent> systemEvent,
SystemEventListener listener)
|
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_FAMILY
public static final String COMPONENT_TYPE
public static final String METADATA_FACET_NAME
public static final String UNIQUE_ID_PREFIX
public static final String VIEW_PARAMETERS_KEY
Constructor Detail |
---|
public UIViewRoot()
Method Detail |
---|
public void addComponentResource(FacesContext context, UIComponent componentResource)
public void addComponentResource(FacesContext context, UIComponent componentResource, String target)
public void addPhaseListener(PhaseListener phaseListener)
public void broadcastEvents(FacesContext context, PhaseId phaseId)
public String createUniqueId()
public String createUniqueId(FacesContext context, String seed)
createUniqueId
in interface UniqueIdVendor
public void encodeBegin(FacesContext context) throws IOException
encodeBegin
in class UIComponentBase
IOException
public void encodeChildren(FacesContext context) throws IOException
encodeChildren
in class UIComponentBase
IOException
public void encodeEnd(FacesContext context) throws IOException
encodeEnd
in class UIComponentBase
IOException
@JSFProperty(returnSignature="void", methodSignature="javax.faces.event.PhaseEvent", jspName="afterPhase", stateHolder=true) public javax.el.MethodExpression getAfterPhaseListener()
@JSFProperty(returnSignature="void", methodSignature="javax.faces.event.PhaseEvent", jspName="beforePhase", stateHolder=true) public javax.el.MethodExpression getBeforePhaseListener()
public String getClientId(FacesContext context)
As this component has no "id" property, it has no clientId property either.
getClientId
in class UIComponentBase
public List<UIComponent> getComponentResources(FacesContext context, String target)
public String getFamily()
getFamily
in class UIComponent
@JSFProperty public Locale getLocale()
Defaults to the default locale specified in the faces configuration file.
public List<PhaseListener> getPhaseListeners()
@JSFProperty public String getRenderKitId()
public boolean getRendersChildren()
UIComponentBase
getRendersChildren
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 Map<String,Object> getViewMap()
public Map<String,Object> getViewMap(boolean create)
public boolean isInView()
isInView
in class UIComponent
public void processApplication(FacesContext context)
public void processDecodes(FacesContext context)
processDecodes
in class UIComponentBase
public void processRestoreState(FacesContext context, Object state)
processRestoreState
in class UIComponentBase
public void queueEvent(FacesEvent event)
queueEvent
in class UIComponentBase
public void processValidators(FacesContext context)
processValidators
in class UIComponentBase
public void processUpdates(FacesContext context)
UIComponentBase
Components 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 UIComponentBase
public void setLocale(Locale locale)
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 UIComponentBase
public 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 UIComponentBase
public void setInView(boolean isInView)
This value is set in the following conditions:
setInView
in class UIComponent
public void removeComponentResource(FacesContext context, UIComponent componentResource)
public void removeComponentResource(FacesContext context, UIComponent componentResource, String target)
public void setViewId(String viewId)
public void removePhaseListener(PhaseListener phaseListener)
public void setBeforePhaseListener(javax.el.MethodExpression beforePhaseListener)
beforePhaseListener
- the new beforePhaseListener valuepublic void setAfterPhaseListener(javax.el.MethodExpression afterPhaseListener)
afterPhaseListener
- the new afterPhaseListener valuepublic Object saveState(FacesContext facesContext)
UIComponentBase
saveState
in interface StateHolder
saveState
in class UIComponentBase
public void restoreState(FacesContext facesContext, Object state)
UIComponentBase
restoreState
in interface StateHolder
restoreState
in class UIComponentBase
state
- is an object previously returned by the saveState method of this class.public List<SystemEventListener> getViewListenersForEventClass(Class<? extends SystemEvent> systemEvent)
public void subscribeToViewEvent(Class<? extends SystemEvent> systemEvent, SystemEventListener listener)
public void unsubscribeFromViewEvent(Class<? extends SystemEvent> systemEvent, SystemEventListener listener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |