|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidad.util.ComponentReference<T>
public final class ComponentReference<T extends UIComponent>
A utility to store a reference to an UIComponent. Application developers
should use this tool if they need to have a reference to an instance of the
UIComponent class in managed beans that are session scoped.
Use newUIComponentReference() to create a ComponentReference and
use the getComponent() to look up the referenced UIComponent.
Please note:
UIComponent APIs.
UIComponent is required to have an ID
UIComponent is moved between NamingContainers or
if any of the ancestor NamingContainers have their IDs changed.
UIComponents are not Serializable and therefore
can not be used at any scope longer than request.
newUIComponentReference(UIComponent),
getComponent(),
Serialized Form| Method Summary | ||
|---|---|---|
T |
getComponent()
This method will use a calculated "component path" to walk down to the UIComponent
that is referenced by this class. |
|
static
|
newUIComponentReference(T uicomponent)
Factory method to create an instance of the ComponentReference class, which wraps the given
UIComponent. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T extends UIComponent> ComponentReference<T> newUIComponentReference(T uicomponent)
ComponentReference class, which wraps the given
UIComponent. The component must be in the component tree when this method
is called and that we will throw an IllegalArgumentException if it is not.
uicomponent - the UIComponent to wrap.
ComponentReference that wrap the given component
IllegalArgumentException - if component is not in the component tree
IllegalArgumentException - if component does not have an Idpublic T getComponent()
UIComponent
that is referenced by this class. If the component can not be found, the getComponent()
will return null.
UIComponent or null if it can not be found.newUIComponentReference(UIComponent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||