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. As of
version 1.2 of the JavaServer Faces Specification, component authors
are encouraged to return true from this method and rely
on the implementation of encodeChildren in this class and in
the Renderer (Renderer#encodeChildren). Subclasses that wish
to manage the rendering of their children should override this method
to return true instead.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private UIComponentBase. | attributes
The |
| private UIComponentBase. | behaviors
behaviors associated with this component. |
| private static final int | |
| private List | |
| private String | clientId
The assigned client identifier for this component. |
| private Map | descriptors
Each entry is an map of |
| private static final Object[] | |
| private static final Iterator | |
| private static final Object[] | EMPTY_OBJECT_ARRAY
An EMPTY_OBJECT_ARRAY argument list to be passed to reflection methods. |
| private Map | |
| private String | id
The component identifier for this component. |
| private AttachedObjectListHolder | |
| private Map | |
| private static Logger | |
| private static final int | |
| private UIComponent | parent
The parent component for this component. |
| private Map | pdMap
Reference to the map of |
| private boolean | transientFlag
Flag indicating a desire to now participate in state saving. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addClientBehavior(String
the logical name of the client-side event to attach
the behavior to. eventName, ClientBehavior the behavior)javax.faces.component.behavior.Behavior
instance to attach for the specified event name.This is a default implementation of
|
| protected void | addFacesListener(FacesListener
The listener)FacesListener to be registeredImplements abstract javax. Add the specified |
| private void | assertClientBehaviorHolder()
|
| public void | broadcast(FacesEvent
The event)FacesEvent to be broadcastImplements abstract javax. Broadcast the specified |
| public void | clearInitialState()
Overrides javax. Implements javax. For each of the attached objects on
this instance that implement |
| public void | decode(FacesContext
FacesContext for the request we are processingImplements abstract javax. Decode any new state of this |
| private static void | |
| private void | |
| private void | |
| public void | encodeBegin(FacesContext
FacesContext for the response we are creatingImplements abstract javax. If our
|
| public void | encodeChildren(FacesContext
FacesContext for the response we are creatingImplements abstract javax. If our |
| public void | encodeEnd(FacesContext
FacesContext for the response we are creatingImplements abstract javax. If our
|
| private static void | eraseParent(UIComponent
UIComponent to have any parent erasedIf the specified |
| public UIComponent | findComponent(String
Search expression identifying the expr)UIComponent
to be returnedImplements abstract javax. Search for and
return the |
| private static UIComponent | findComponent(UIComponent
Base base, String UIComponent from which to searchComponent identifier to be matched id, boolean checkId)Return the |
| public Map | getAttributes()
Implements abstract javax. Return a mutable
|
| public int | getChildCount()
Implements abstract javax. Return the number of child |
| public List | getChildren()
Implements abstract javax. Return a mutable
|
| public Map | Returns: behaviors associated with this component.This is a default implementation of
|
| public String | getClientId(FacesContext
The context)FacesContext for the current requestImplements abstract javax. Return a client-side identifier for this component, generating one if necessary. |
| public String | Returns: the default event name.This is a default implementation of
|
| pack-priv Map | |
| public Collection | Returns: the collection of event names.This is a default implementation of
|
| protected FacesContext | getFacesContext()
Implements abstract javax. Convenience method to return the |
| protected FacesListener[] | getFacesListeners(Class<T>
Class that must be implemented by a clazz)FacesListener
for it to be returnedImplements abstract javax. Return an array of registered |
| public UIComponent | getFacet(String
Name of the desired facet name)Implements abstract javax. Convenience method to return the named facet, if it exists, or
|
| public int | getFacetCount()
Overrides javax. Return the number of facet |
| public Map | getFacets()
Implements abstract javax. Return a mutable |
| public Iterator | getFacetsAndChildren()
Implements abstract javax. Return an |
| public String | getId()
Implements abstract javax. Return the component identifier of this |
| public List | getListenersForEventClass(Class<? extends SystemEvent>
the eventClass)Class of event for which the
listeners must be returned.Overrides javax. Implements javax. Return the
|
| private UIComponent | |
| public UIComponent | getParent()
Implements abstract javax. Return the parent |
| public Map | getPassThroughAttributes(boolean
if create)true, a new Map
instance will be created if it does not exist already. If
false, and there is no existing
Map instance, one will not be created and
null will be returned.Overrides javax. This method has the same specification as
|
| private PropertyDescriptor[] | getPropertyDescriptors()
Return an array of |
| protected Renderer | getRenderer(FacesContext
FacesContext for the current requestImplements abstract javax. Convenience method to return the |
| public String | getRendererType()
Implements abstract javax. Return the |
| public boolean | getRendersChildren()
Implements abstract javax. Return a flag indicating whether this component is responsible for rendering its child components. |
| public ValueBinding | getValueBinding(String
Name of the attribute or property for which to retrieve a
name)ValueBindingImplements abstract javax.
Deprecated
This has been replaced by
getValueExpression.
Call through to |
| public boolean | invokeOnComponent(FacesContext
the context, String FacesContext for the current requestthe client identifier of the component to be passed
to the argument callback. clientId, ContextCallback an implementation of the Callback interface. callback)Overrides javax. Starting at this
component in the View hierarchy, search for a component with a
|
| private boolean | |
| public boolean | isRendered()
Implements abstract javax. Return |
| public boolean | isTransient()
Implements javax. If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | markInitialState()
Overrides javax. Implements javax. For each of the attached objects on
this instance that implement |
| private void | |
| public void | processDecodes(FacesContext
FacesContext for the request we are processingImplements abstract javax. 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. |
| public void | processRestoreState(FacesContext
FacesContext for the request we are processingthe state. state)Implements abstract javax. 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. |
| public Object | processSaveState(FacesContext
FacesContext for the request we are processingImplements abstract javax. 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. |
| public void | processUpdates(FacesContext
FacesContext for the request we are processingImplements abstract javax. 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. |
| public void | processValidators(FacesContext
FacesContext for the request we are processingImplements abstract javax. 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. |
| private static void | |
| public void | queueEvent(FacesEvent
FacesEvent to be queuedImplements abstract javax. Queue an event for broadcast at the end of the current request processing lifecycle phase. |
| protected void | removeFacesListener(FacesListener
The listener)FacesListener to be deregisteredImplements abstract javax. Remove the specified |
| public static Object | Returns: the object restored fromstateObj.the context, Object FacesContext for this requestthe opaque object returned from stateObj)saveAttachedStateThis method is called by |
| private void | |
| private UIComponentBase. | Returns: restoredMap of the behaviors.the context, Object FacesContext for this request.saved state of the state)Behavior's attached to the component.
|
| private static Map | |
| public void | restoreState(FacesContext
the Faces context. context, Object the state. state)Implements javax. Perform any processing required to restore the state from the entries in the state Object. |
| private Map | |
| public static Object | Returns: The state object to be saved.the context, Object FacesContext for this request.the object, which may be a
attachedObject)List instance, or an Object. The
attachedObject (or the elements that comprise
attachedObject may implement StateHolder.This method is called by |
| private Object | |
| private Object | Returns: map converted to the array ofObject or null if no behaviors have been set.the context)FacesContext for this request.Save state of the behaviors map. |
| private Object | |
| public Object | saveState(FacesContext
the Faces context. context)Implements javax. Gets the state of the instance as a
|
| private Object | |
| public void | setId(String
The new component identifier, or id)null to indicate
that this UIComponent does not have a component identifierImplements abstract javax. Set the component identifier of this |
| public void | setParent(UIComponent
The new parent, or parent)null for the root node
of a component treeImplements abstract javax. Set the parent
|
| public void | setRendered(boolean
If rendered)true render this component;
otherwise, do not render this componentImplements abstract javax. Set the |
| public void | setRendererType(String
Logical identifier of the type of
rendererType)Renderer to use, or null for components
that render themselvesImplements abstract javax. Set the |
| public void | setTransient(boolean
boolean pass transientFlag)true if this
Object will not
participate in state saving or restoring, otherwise pass
false.Implements javax. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| public void | setValueBinding(String
Name of the attribute or property for which to set a
name, ValueBinding binding)ValueBindingImplements abstract javax.
Deprecated
This has been replaced by
setValueExpression.
Wrap the argument |
| public void | subscribeToEvent(Class<? extends SystemEvent>
the eventClass, ComponentSystemEventListener Class of event for which
listener must be fired.the implementation of componentListener)javax.faces.event.ComponentSystemEventListener whose javax.faces.event.ComponentSystemEventListener#processEvent method must be called
when events of type facesEventClass are fired.Overrides javax. Install the listener instance
referenced by argument |
| public void | unsubscribeFromEvent(Class<? extends SystemEvent>
the eventClass, ComponentSystemEventListener Class of event for which
listener must be removed.the implementation of componentListener)ComponentSystemEventListener whose ComponentSystemEventListener#processEvent method must no longer be called
when events of type eventClass are fired.Overrides javax. Remove the listener instance
referenced by argument |
| private static void | validateId(String
The component identifier to test id)Throw |