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 Jakarta 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 | children
The |
| 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 | facets
The |
| 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 | propertyDescriptorMap
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)jakarta.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 jakarta.
Add the specified |
| private String | |
| private void | assertClientBehaviorHolder()
|
| public void | broadcast(FacesEvent
The event)FacesEvent to be broadcastImplements abstract jakarta.
Broadcast the specified |
| public void | clearInitialState()
Overrides jakarta. Implements jakarta.
For each of the attached objects on this instance that implement |
| private List | |
| private List | |
| public void | decode(FacesContext
FacesContext for the request we are processingImplements abstract jakarta.
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 jakarta.
If our |
| public void | encodeChildren(FacesContext
FacesContext for the response we are creatingImplements abstract jakarta.
If our |
| public void | encodeEnd(FacesContext
FacesContext for the response we are creatingImplements abstract jakarta.
If our |
| private static void | eraseParent(UIComponent
UIComponent to have any parent erased
If the specified |
| private UIComponent | |
| private UIComponent | |
| public UIComponent | findComponent(String
Search expression identifying the expression)UIComponent to be returnedImplements abstract jakarta.
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 |
| private String | |
| public Map | getAttributes()
Implements abstract jakarta.
Return a mutable |
| public int | getChildCount()
Implements abstract jakarta.
Return the number of child |
| public List | getChildren()
Implements abstract jakarta.
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 jakarta. 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 jakarta.
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 jakarta.
Return an array of registered |
| public UIComponent | getFacet(String
Name of the desired facet name)Implements abstract jakarta.
Convenience method to return the named facet, if it exists, or |
| public int | getFacetCount()
Overrides jakarta.
Return the number of facet |
| public Map | getFacets()
Implements abstract jakarta.
Return a mutable |
| public Iterator | getFacetsAndChildren()
Implements abstract jakarta.
Return an |
| public String | getId()
Implements abstract jakarta.
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 jakarta. Implements jakarta.
Return the |
| private UIComponent | |
| public UIComponent | getParent()
Implements abstract jakarta.
Return the parent |
| private String | |
| 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 jakarta.
This method has the same specification as |
| private PropertyDescriptor[] | getPropertyDescriptors()
Return an array of |
| protected Renderer | getRenderer(FacesContext
FacesContext for the current requestImplements abstract jakarta.
Convenience method to return the |
| public String | getRendererType()
Implements abstract jakarta.
Return the |
| public boolean | getRendersChildren()
Implements abstract jakarta. Return a flag indicating whether this component is responsible for rendering its child components. |
| 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 jakarta.
Starting at this component in the View hierarchy, search for a component
with a |
| private boolean | |
| public boolean | isRendered()
Implements abstract jakarta.
Return |
| public boolean | isTransient()
Implements jakarta. If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | markInitialState()
Overrides jakarta. Implements jakarta.
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 jakarta. 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 jakarta. 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 jakarta. 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 jakarta. 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 jakarta. 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 jakarta. 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 jakarta.
Remove the specified |
| public static Object | Returns: the object restored fromstateObj.the context, Object FacesContext for this requestthe opaque object returned from stateObj)saveAttachedState
This 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 | |
| private int | |
| private void | |
| public void | restoreState(FacesContext
the Faces context. context, Object the state. state)Implements jakarta. 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 jakarta.
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 jakarta.
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 jakarta.
Set the parent |
| public void | setRendered(boolean
If rendered)true render this component; otherwise, do not render this componentImplements abstract jakarta.
Set the |
| public void | setRendererType(String
Logical identifier of the type of rendererType)Renderer to use, or null for components
that render themselvesImplements abstract jakarta.
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 jakarta. Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| public void | subscribeToEvent(Class<? extends SystemEvent>
the eventClass, ComponentSystemEventListener Class of event for which listener must be fired.the implementation of componentListener)jakarta.faces.event.ComponentSystemEventListener whose
jakarta.faces.event.ComponentSystemEventListener#processEvent method must be called when events of type
facesEventClass are fired.Overrides jakarta.
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 jakarta.
Remove the listener instance referenced by argument |
| private static void | validateId(String
The component identifier to test id)
Throw |