|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.faces.component.UIComponent | +--javax.faces.component.UIComponentBase
UIComponentBase is a convenience base class that
implements the default concrete behavior of all methods defined by
UIComponent
.
By default, this class defines getRendersChildren()
to find the renderer for this component and call its
getRendersChildren()
method. The default implementation
on the Renderer
returns false
. Subclasses
that wish to manage the rendering of their children should override
this method to return true
instead.
Constructor Summary | |
UIComponentBase()
|
Method Summary | |
protected void |
addFacesListener(javax.faces.event.FacesListener listener)
Add the specified FacesListener to the set of listeners
registered to receive event notifications from this UIComponent . |
void |
broadcast(javax.faces.event.FacesEvent event)
Broadcast the specified FacesEvent to all registered
event listeners who have expressed an interest in events of this
type. |
void |
decode(javax.faces.context.FacesContext context)
Decode any new state of this UIComponent from the
request contained in the specified FacesContext , and store
this state as needed. |
void |
encodeBegin(javax.faces.context.FacesContext context)
If our rendered property is true ,
render the beginning of the current state of this
UIComponent to the response contained in the specified
FacesContext . |
void |
encodeChildren(javax.faces.context.FacesContext context)
If our rendered property is true ,
render the child UIComponent s of this UIComponent . |
void |
encodeEnd(javax.faces.context.FacesContext context)
If our rendered property is true ,
render the ending of the current state of this
UIComponent . |
javax.faces.component.UIComponent |
findComponent(java.lang.String expr)
Search for and return the UIComponent with an id
that matches the specified search expression (if any), according to the
algorithm described below. |
java.util.Map |
getAttributes()
Return a mutable Map representing the attributes
(and properties, see below) associated wth this UIComponent ,
keyed by attribute name (which must be a String). |
int |
getChildCount()
Return the number of child UIComponent s that are
associated with this UIComponent . |
java.util.List |
getChildren()
Return a mutable List representing the child
UIComponent s associated with this component. |
java.lang.String |
getClientId(javax.faces.context.FacesContext context)
Return a client-side identifier for this component, generating one if necessary. |
protected javax.faces.context.FacesContext |
getFacesContext()
Convenience method to return the FacesContext instance
for the current request. |
protected javax.faces.event.FacesListener[] |
getFacesListeners(java.lang.Class clazz)
Return an array of registered FacesListener s that are
instances of the specified class. |
javax.faces.component.UIComponent |
getFacet(java.lang.String name)
Convenience method to return the named facet, if it exists, or null otherwise. |
java.util.Map |
getFacets()
Return a mutable Map representing the facet
UIComponent s associated with this UIComponent ,
keyed by facet name (which must be a String). |
java.util.Iterator |
getFacetsAndChildren()
Return an Iterator over the facet followed by child
UIComponent s of this UIComponent . |
java.lang.String |
getId()
Return the component identifier of this UIComponent . |
javax.faces.component.UIComponent |
getParent()
Return the parent UIComponent of this
UIComponent , if any. |
protected javax.faces.render.Renderer |
getRenderer(javax.faces.context.FacesContext context)
Convenience method to return the Renderer instance
associated with this component, if any; otherwise, return
null . |
java.lang.String |
getRendererType()
Return the Renderer type for this UIComponent
(if any). |
boolean |
getRendersChildren()
Return a flag indicating whether this component is responsible for rendering its child components. |
javax.faces.el.ValueBinding |
getValueBinding(java.lang.String name)
Return the ValueBinding used to calculate the value for the
specified attribute or property name, if any. |
boolean |
isRendered()
Return true if this component (and its children)
should be rendered during the Render Response phase
of the request processing lifecycle. |
boolean |
isTransient()
If true, the Object implementing this interface must not participate in state saving or restoring. |
void |
processDecodes(javax.faces.context.FacesContext context)
Perform the component tree processing required by the Apply Request Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
void |
processRestoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Perform the component tree processing required by the Restore View phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
java.lang.Object |
processSaveState(javax.faces.context.FacesContext context)
Perform the component tree processing required by the state saving portion of the Render Response phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
void |
processUpdates(javax.faces.context.FacesContext context)
Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
void |
processValidators(javax.faces.context.FacesContext context)
Perform the component tree processing required by the Process Validations phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
void |
queueEvent(javax.faces.event.FacesEvent event)
Queue an event for broadcast at the end of the current request processing lifecycle phase. |
protected void |
removeFacesListener(javax.faces.event.FacesListener listener)
Remove the specified FacesListener from the set of listeners
registered to receive event notifications from this UIComponent . |
static java.lang.Object |
restoreAttachedState(javax.faces.context.FacesContext context,
java.lang.Object stateObj)
This method is called by UIComponent subclasses that
need to restore the objects they saved using saveAttachedState(javax.faces.context.FacesContext, java.lang.Object) . |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
Perform any processing required to restore the state from the entries in the state Object. |
static java.lang.Object |
saveAttachedState(javax.faces.context.FacesContext context,
java.lang.Object attachedObject)
This method is called by UIComponent subclasses that
want to save one or more attached objects. |
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
Gets the state of the instance as a Serializable Object. |
void |
setId(java.lang.String id)
Set the component identifier of this UIComponent (if any). |
void |
setParent(javax.faces.component.UIComponent parent)
Set the parent UIComponent of this
UIComponent . |
void |
setRendered(boolean rendered)
Set the rendered property of this
UIComponent . |
void |
setRendererType(java.lang.String rendererType)
Set the Renderer type for this UIComponent ,
or null for components that render themselves. |
void |
setTransient(boolean transientFlag)
Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
void |
setValueBinding(java.lang.String name,
javax.faces.el.ValueBinding binding)
Set the ValueBinding used to calculate the value for the
specified attribute or property name, if any. |
Methods inherited from class javax.faces.component.UIComponent |
getFamily |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UIComponentBase()
Method Detail |
public java.util.Map getAttributes()
UIComponent
Return a mutable Map
representing the attributes
(and properties, see below) associated wth this UIComponent
,
keyed by attribute name (which must be a String). The returned
implementation must support all of the standard and optional
Map
methods, plus support the following additional
requirements:
Map
implementation must implement
the java.io.Serializable
interface.null
key or value must
throw a NullPointerException
.ClassCastException
.UIComponent
's implementation class, the following
methods will have special behavior:
containsKey
- Return false
.get()
- If the property is readable, call
the getter method and return the returned value (wrapping
primitive values in their corresponding wrapper classes);
otherwise throw IllegalArgumentException
.put()
- If the property is writeable, call
the setter method to set the corresponding value (unwrapping
primitive values in their corresponding wrapper classes).
If the property is not writeable, or an attempt is made to
set a property of primitive type to null
,
throw IllegalArgumentException
.remove
- Throw
IllegalArgumentException
.
getAttributes
in class UIComponent
public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
UIComponent
Return the ValueBinding
used to calculate the value for the
specified attribute or property name, if any.
getValueBinding
in class UIComponent
name
- Name of the attribute or property for which to retrieve a
ValueBinding
java.lang.NullPointerException
- if name
is null
public void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
UIComponent
Set the ValueBinding
used to calculate the value for the
specified attribute or property name, if any.
setValueBinding
in class UIComponent
name
- Name of the attribute or property for which to set a
ValueBinding
binding
- The ValueBinding
to set, or null
to remove any currently set ValueBinding
java.lang.IllegalArgumentException
- if name
is one of
id
or parent
java.lang.NullPointerException
- if name
is null
public java.lang.String getClientId(javax.faces.context.FacesContext context)
UIComponent
Return a client-side identifier for this component, generating
one if necessary. The associated Renderer
, if any,
will be asked to convert the clientId to a form suitable for
transmission to the client.
The return from this method must be the same value throughout
the lifetime of the instance, unless the id
property
of the component is changed, or the component is placed in
a NamingContainer
whose client ID changes (for example,
UIData
). However, even in these cases, consecutive
calls to this method must always return the same value.
getClientId
in class UIComponent
context
- The FacesContext
for the current request
java.lang.NullPointerException
- if context
is null
public java.lang.String getId()
UIComponent
Return the component identifier of this UIComponent
.
getId
in class UIComponent
public void setId(java.lang.String id)
UIComponent
Set the component identifier of this UIComponent
(if any).
Component identifiers must obey the following syntax restrictions:
Component identifiers must also obey the following semantic
restrictions (note that this restriction is NOT
enforced by the setId()
implementation):
UIComponent
that is a NamingContainer
, or within
the scope of the entire component tree if there is no such
ancestor that is a NamingContainer
.
setId
in class UIComponent
id
- The new component identifier, or null
to indicate
that this UIComponent
does not have a component identifier
java.lang.IllegalArgumentException
- if id
is not
syntactically valid
java.lang.IllegalStateException
public javax.faces.component.UIComponent getParent()
UIComponent
Return the parent UIComponent
of this
UIComponent
, if any.
getParent
in class UIComponent
public void setParent(javax.faces.component.UIComponent parent)
UIComponent
Set the parent UIComponent
of this
UIComponent
. This method must
never be called by developers; a UIComponent
's internal
implementation will call it as components are added to or
removed from a parent's child List
or
facet Map
.
setParent
in class UIComponent
parent
- The new parent, or null
for the root node
of a component treepublic boolean isRendered()
UIComponent
Return true
if this component (and its children)
should be rendered during the Render Response phase
of the request processing lifecycle.
isRendered
in class UIComponent
public void setRendered(boolean rendered)
UIComponent
Set the rendered
property of this
UIComponent
.
setRendered
in class UIComponent
rendered
- If true
render this component;
otherwise, do not render this componentpublic java.lang.String getRendererType()
UIComponent
Return the Renderer
type for this UIComponent
(if any).
getRendererType
in class UIComponent
public void setRendererType(java.lang.String rendererType)
UIComponent
Set the Renderer
type for this UIComponent
,
or null
for components that render themselves.
setRendererType
in class UIComponent
rendererType
- Logical identifier of the type of
Renderer
to use, or null
for components
that render themselvespublic boolean getRendersChildren()
UIComponent
Return a flag indicating whether this component is responsible
for rendering its child components. The default implementation
in getRendersChildren()
tries to find the
renderer for this component. If it does, it calls Renderer.getRendersChildren()
and returns the result. If it
doesn't, it returns false.
getRendersChildren
in class UIComponent
public java.util.List getChildren()
UIComponent
Return a mutable List
representing the child
UIComponent
s associated with this component. The returned
implementation must support all of the standard and optional
List
methods, plus support the following additional
requirements:
List
implementation must implement
the java.io.Serializable
interface.null
must throw
a NullPointerExceptionUIComponent
must throw a ClassCastException.parent
property of the child must be set to this component instance.
If the parent
property of the child was already
non-null, the child must first be removed from its previous
parent (where it may have been either a child or a facet).parent
property of the child must be set to
null
.
getChildren
in class UIComponent
public int getChildCount()
UIComponent
Return the number of child UIComponent
s that are
associated with this UIComponent
. If there are no
children, this method must return 0. The method must not cause
the creation of a child component list.
getChildCount
in class UIComponent
public javax.faces.component.UIComponent findComponent(java.lang.String expr)
UIComponent
Search for and return the UIComponent
with an id
that matches the specified search expression (if any), according to the
algorithm described below.
Component identifiers are required to be unique within the scope of
the closest ancestor NamingContainer
that encloses this
component (which might be this component itself). If there are no
NamingContainer
components in the ancestry of this component,
the root component in the tree is treated as if it were a
NamingContainer
, whether or not its class actually implements
the NamingContainer
interface.
A search expression consists of either an
identifier (which is matched exactly against the id
property of a UIComponent
, or a series of such identifiers
linked by the NamingContainer.SEPARATOR_CHAR
character value.
The search algorithm operates as follows:
UIComponent
that will be the base for searching,
by stopping as soon as one of the following conditions is met:
UIComponent
of the component
tree. The leading separator character will be stripped off,
and the remainder of the search expression will be treated as
a "relative" search expression as described below.UIComponent
is a
NamingContainer
it will serve as the basis.NamingContainer
is encountered, it will be the base.
NamingContainer
is encountered)
the root UIComponent
will be the base.id
that matches, within
the scope of the base component. The match is performed as follows:
id
property, and then recursively
through the facets and children of the base UIComponent
(except that if a descendant NamingContainer
is found,
its own facets and children are not searched).NamingContainer
by the rules in the
previous bullet point. Then, the findComponent()
method of this NamingContainer
will be called, passing
the remainder of the search expression.
findComponent
in class UIComponent
expr
- Search expression identifying the UIComponent
to be returned
UIComponent
, or null
if the component was not found.
java.lang.NullPointerException
- if expr
is null
public java.util.Map getFacets()
UIComponent
Return a mutable Map
representing the facet
UIComponent
s associated with this UIComponent
,
keyed by facet name (which must be a String). The returned
implementation must support all of the standard and optional
Map
methods, plus support the following additional
requirements:
Map
implementation must implement
the java.io.Serializable
interface.null
key or value must
throw a NullPointerException.UIComponent
must throw a ClassCastException.UIComponent
is added:
parent
property of the component must be set to
this component instance.parent
property of the component was already
non-null, the component must first be removed from its previous
parent (where it may have been either a child or a facet).UIComponent
is removed:
parent
property of the facet must be
set to null
.
getFacets
in class UIComponent
public javax.faces.component.UIComponent getFacet(java.lang.String name)
UIComponent
Convenience method to return the named facet, if it exists, or
null
otherwise. If the requested facet does not
exist, the facets Map must not be created.
getFacet
in class UIComponent
name
- Name of the desired facetpublic java.util.Iterator getFacetsAndChildren()
UIComponent
Return an Iterator
over the facet followed by child
UIComponent
s of this UIComponent
.
Facets are returned in an undefined order, followed by
all the children in the order they are stored in the child list. If this
component has no facets or children, an empty Iterator
is returned.
The returned Iterator
must not support the
remove()
operation.
getFacetsAndChildren
in class UIComponent
public void broadcast(javax.faces.event.FacesEvent event) throws AbortProcessingException
UIComponent
Broadcast the specified FacesEvent
to all registered
event listeners who have expressed an interest in events of this
type. Listeners are called in the order in which they were
added.
broadcast
in class UIComponent
event
- The FacesEvent
to be broadcast
AbortProcessingException
- Signal the JavaServer Faces
implementation that no further processing on the current event
should be performed
java.lang.IllegalStateException
java.lang.NullPointerException
- if event
is
null
public void decode(javax.faces.context.FacesContext context)
UIComponent
Decode any new state of this UIComponent
from the
request contained in the specified FacesContext
, and store
this state as needed.
During decoding, events may be enqueued for later processing
(by event listeners who have registered an interest), by calling
queueEvent()
.
decode
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
UIComponent
If our rendered
property is true
,
render the beginning of the current state of this
UIComponent
to the response contained in the specified
FacesContext
.
If a Renderer
is associated with this UIComponent
,
the actual encoding will be delegated to
Renderer.encodeBegin(FacesContext, UIComponent)
.
encodeBegin
in class UIComponent
context
- FacesContext
for the response we are creating
java.lang.NullPointerException
- if context
is null
java.io.IOException
- if an input/output error occurs while renderingpublic void encodeChildren(javax.faces.context.FacesContext context) throws java.io.IOException
UIComponent
If our rendered
property is true
,
render the child UIComponent
s of this UIComponent
.
This method will only be called
if the rendersChildren
property is true
.
If a Renderer
is associated with this UIComponent
,
the actual encoding will be delegated to
Renderer.encodeBegin(FacesContext, UIComponent)
.
encodeChildren
in class UIComponent
context
- FacesContext
for the response we are creating
java.lang.NullPointerException
- if context
is null
java.io.IOException
- if an input/output error occurs while renderingpublic void encodeEnd(javax.faces.context.FacesContext context) throws java.io.IOException
UIComponent
If our rendered
property is true
,
render the ending of the current state of this
UIComponent
.
If a Renderer
is associated with this UIComponent
,
the actual encoding will be delegated to
Renderer.encodeBegin(FacesContext, UIComponent)
.
encodeEnd
in class UIComponent
context
- FacesContext
for the response we are creating
java.lang.NullPointerException
- if context
is null
java.io.IOException
- if an input/output error occurs while renderingprotected void addFacesListener(javax.faces.event.FacesListener listener)
Add the specified FacesListener
to the set of listeners
registered to receive event notifications from this UIComponent
.
It is expected that UIComponent
classes acting as event sources
will have corresponding typesafe APIs for registering listeners of the
required type, and the implementation of those registration methods
will delegate to this method. For example:
public class FooEvent extends FacesEvent { ... protected boolean isAppropriateListener(FacesListener listener) { return (listener instanceof FooListener); } protected void processListener(FacesListener listener) { ((FooListener) listener).processFoo(this); } ... } public interface FooListener extends FacesListener { public void processFoo(FooEvent event); } public class FooComponent extends UIComponentBase { ... public void addFooListener(FooListener listener) { addFacesListener(listener); } public void removeFooListener(FooListener listener) { removeFacesListener(listener); } ... }
addFacesListener
in class UIComponent
listener
- The FacesListener
to be registered
java.lang.NullPointerException
- if listener
is null
protected javax.faces.event.FacesListener[] getFacesListeners(java.lang.Class clazz)
UIComponent
Return an array of registered FacesListener
s that are
instances of the specified class. If there are no such registered
listeners, a zero-length array is returned. The returned
array can be safely be cast to an array strongly typed to
an element type of clazz
.
getFacesListeners
in class UIComponent
clazz
- Class that must be implemented by a FacesListener
for it to be returned
java.lang.IllegalArgumentException
- if class
is not,
and does not implement, FacesListener
java.lang.NullPointerException
- if clazz
is null
protected void removeFacesListener(javax.faces.event.FacesListener listener)
Remove the specified FacesListener
from the set of listeners
registered to receive event notifications from this UIComponent
.
removeFacesListener
in class UIComponent
listener
- The FacesListener
to be deregistered
java.lang.NullPointerException
- if listener
is null
public void queueEvent(javax.faces.event.FacesEvent event)
UIComponent
Queue an event for broadcast at the end of the current request
processing lifecycle phase. The default implementation in
UIComponentBase
must delegate this call to the
queueEvent()
method of the parent UIComponent
.
queueEvent
in class UIComponent
event
- FacesEvent
to be queued
java.lang.IllegalStateException
- if this component is not a
descendant of a UIViewRoot
java.lang.NullPointerException
- if event
is null
public void processDecodes(javax.faces.context.FacesContext context)
UIComponent
Perform the component tree processing required by the Apply Request Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
rendered
property of this UIComponent
is false
, skip further processing.processDecodes()
method of all facets
and children of this UIComponent
, in the order determined
by a call to getFacetsAndChildren()
.decode()
method of this component.RuntimeException
is thrown during
decode processing, call FacesContext.renderResponse()
and re-throw the exception.
processDecodes
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
public void processValidators(javax.faces.context.FacesContext context)
UIComponent
Perform the component tree processing required by the Process Validations phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
rendered
property of this UIComponent
is false
, skip further processing.processValidators()
method of all facets
and children of this UIComponent
, in the order determined
by a call to getFacetsAndChildren()
.
processValidators
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
public void processUpdates(javax.faces.context.FacesContext context)
UIComponent
Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
rendered
property of this UIComponent
is false
, skip further processing.processUpdates()
method of all facets
and children of this UIComponent
, in the order determined
by a call to getFacetsAndChildren()
.
processUpdates
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
public java.lang.Object processSaveState(javax.faces.context.FacesContext context)
UIComponent
Perform the component tree processing required by the state saving portion of the Render Response phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
transient
property of this
component. If true, just return null
.processSaveState()
method of all
facets and children of this UIComponent
in the order
determined by a call to getFacetsAndChildren()
.saveState()
method of this component.This method may not be called if the state saving method is set to server.
processSaveState
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
public void processRestoreState(javax.faces.context.FacesContext context, java.lang.Object state)
UIComponent
Perform the component tree processing required by the Restore View phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
processRestoreState()
method of all
facets and children of this UIComponent
in the order
determined by a call to getFacetsAndChildren()
.restoreState()
method of this component.This method may not be called if the state saving method is set to server.
processRestoreState
in class UIComponent
context
- FacesContext
for the request we are processing
java.lang.NullPointerException
- if context
is null
protected javax.faces.context.FacesContext getFacesContext()
UIComponent
Convenience method to return the FacesContext
instance
for the current request.
getFacesContext
in class UIComponent
protected javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
UIComponent
Convenience method to return the Renderer
instance
associated with this component, if any; otherwise, return
null
.
getRenderer
in class UIComponent
context
- FacesContext
for the current requestpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
StateHolder
Gets the state of the instance as a
Serializable
Object.
If the class that implements this interface has references to
instances that implement StateHolder (such as a
UIComponent
with event handlers, validators, etc.)
this method must call the StateHolder.saveState(javax.faces.context.FacesContext)
method on all those
instances as well. This method must not save the state
of children and facets. That is done via the StateManager
This method must not alter the state of the implementing object. In other words, after executing this code:
Object state = component.saveState(facesContext);
component
should be the same as before executing
it.
The return from this method must be Serializable
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
StateHolder
Perform any processing required to restore the state from the entries in the state Object.
If the class that implements this interface has references to
instances that also implement StateHolder (such as a
UIComponent
with event handlers, validators, etc.)
this method must call the StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)
method on all those
instances as well.
public boolean isTransient()
StateHolder
If true, the Object implementing this interface must not participate in state saving or restoring.
public void setTransient(boolean transientFlag)
StateHolder
Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.
transientFlag
- boolean pass true
if this Object
will participate in state saving or restoring, otherwise
pass false
.public static java.lang.Object saveAttachedState(javax.faces.context.FacesContext context, java.lang.Object attachedObject)
This method is called by UIComponent
subclasses that
want to save one or more attached objects. It is a convenience
method that does the work of saving attached objects that may or
may not implement the StateHolder
interface. Using this
method implies the use of restoreAttachedState(javax.faces.context.FacesContext, java.lang.Object)
to restore
the attached objects.
This method supports saving attached objects of the following
type: Object
s,
null
values, and Lists
of these
objects. If any contained objects are not Lists
and do not implement StateHolder
, they must have
zero-argument public constructors. The exact structure of the
returned object is undefined and opaque, but will be serializable.
context
- the FacesContext
for this request.attachedObject
- the object, which may be a
List
instance, or an Object. The
attachedObject
(or the elements that comprise
attachedObject
may implement StateHolder
.
java.lang.NullPointerException
- if the context argument is null.public static java.lang.Object restoreAttachedState(javax.faces.context.FacesContext context, java.lang.Object stateObj) throws java.lang.IllegalStateException
This method is called by UIComponent
subclasses that
need to restore the objects they saved using saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)
. This method is tightly coupled with saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)
.
This method supports restoring all attached objects types
supported by saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)
.
context
- the FacesContext
for this requeststateObj
- the opaque object returned from saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)
java.lang.NullPointerException
- if context is null.
java.lang.IllegalStateException
- if the object is not
previously returned by saveAttachedState(javax.faces.context.FacesContext, java.lang.Object)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |