Top Description Inners Fields Constructors Methods
jakarta.faces.component

public Class UINamingContainer

extends UIComponentBase
implements NamingContainer, UniqueIdVendor, StateHolder
Class Inheritance
All Implemented Interfaces
jakarta.faces.component.StateHolder, jakarta.faces.component.UniqueIdVendor, jakarta.faces.component.NamingContainer
Static Imports
com.sun.faces.util.Util.coalesce, jakarta.faces.component.UIViewRoot.UNIQUE_ID_PREFIX, jakarta.faces.component.visit.VisitResult.COMPLETE, java.util.logging.Level.SEVERE

UINamingContainer is a convenience base class for components that wish to implement NamingContainer functionality.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_FAMILY

The standard component family for this component.

public static final String
COMPONENT_TYPE

The standard component type for this component.

private static Logger
public static final String
SEPARATOR_CHAR_PARAM_NAME

The context-param that allows the separator char for clientId strings to be set on a per-web application basis.

Constructor Summary

AccessConstructor and Description
public
UINamingContainer()

Create a new UINamingContainer instance with default property values.

Method Summary

Modifier and TypeMethod and Description
public String
createUniqueId(FacesContext
FacesContext
context
,
String
an optional seed value - e.g. based on the position of the component in the VDL-template
seed
)

Implements jakarta.faces.component.UniqueIdVendor.createUniqueId.

Generate an identifier for a component.

public String
getFamily()

Implements abstract jakarta.faces.component.UIComponent.getFamily.

Return the identifier of the component family to which this component belongs.

private Integer
public static char

Returns:

the separator char.
getSeparatorChar
(FacesContext
the FacesContext for the current request
context
)

Return the character used to separate segments of a clientId.

private void
public boolean

Returns:

true if tree should be visited, false otherwise.
visitTree
(VisitContext
the VisitContext for this visit
context
,
VisitCallback
the VisitCallback instance whose visit method will be called for each node visited.
callback
)

Overrides jakarta.faces.component.UIComponent.visitTree.

Perform a tree visit starting at this node in the tree.

Inherited from jakarta.faces.component.UIComponentBase:
addClientBehavioraddFacesListenerbroadcastclearInitialStatedecodeencodeBeginencodeChildrenencodeEndfindComponentgetAttributesgetChildCountgetChildrengetClientBehaviorsgetClientIdgetDefaultEventNamegetDescriptorMapgetEventNamesgetFacesContextgetFacesListenersgetFacetgetFacetCountgetFacetsgetFacetsAndChildrengetIdgetListenersForEventClassgetParentgetPassThroughAttributesgetRenderergetRendererTypegetRendersChildreninvokeOnComponentisRenderedisTransientmarkInitialStateprocessDecodesprocessRestoreStateprocessSaveStateprocessUpdatesprocessValidatorsqueueEventremoveFacesListenerrestoreAttachedStaterestoreStatesaveAttachedStatesaveStatesetIdsetParentsetRenderedsetRendererTypesetTransientsubscribeToEventunsubscribeFromEvent

Field Detail

COMPONENT_FAMILYback to summary
public static final String COMPONENT_FAMILY

The standard component family for this component.

COMPONENT_TYPEback to summary
public static final String COMPONENT_TYPE

The standard component type for this component.

LOGGERback to summary
private static Logger LOGGER

Hides jakarta.faces.component.UIComponentBase.LOGGER.

SEPARATOR_CHAR_PARAM_NAMEback to summary
public static final String SEPARATOR_CHAR_PARAM_NAME

The context-param that allows the separator char for clientId strings to be set on a per-web application basis.

Since
2.0

Constructor Detail

UINamingContainerback to summary
public UINamingContainer()

Create a new UINamingContainer instance with default property values.

Method Detail

createUniqueIdback to summary
public String createUniqueId(FacesContext context, String seed)

Implements jakarta.faces.component.UniqueIdVendor.createUniqueId.

Doc from jakarta.faces.component.UniqueIdVendor.createUniqueId.

Generate an identifier for a component. The identifier will be prefixed with UNIQUE_ID_PREFIX, and will be unique within this component-container. Optionally, a unique seed value can be supplied by component creators which should be included in the generated unique id.

Parameters
context:FacesContext

FacesContext

seed:String

an optional seed value - e.g. based on the position of the component in the VDL-template

Returns:String

a unique-id in this component-container

Annotations
@Override
getFamilyback to summary
public String getFamily()

Implements abstract jakarta.faces.component.UIComponent.getFamily.

Doc from jakarta.faces.component.UIComponent.getFamily.

Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance. Note this method should NOT return null

Returns:String

the component family (not null).

Annotations
@Override
getLastIdback to summary
private Integer getLastId()
getSeparatorCharback to summary
public static char getSeparatorChar(FacesContext context)

Return the character used to separate segments of a clientId. The implementation must determine if there is a <context-param> with the value given by the value of the symbolic constant SEPARATOR_CHAR_PARAM_NAME. If there is a value for this param, the first character of the value must be returned from this method. Otherwise, the value of the symbolic constant NamingContainer#SEPARATOR_CHAR must be returned.

Parameters
context:FacesContext

the FacesContext for the current request

Returns:char

the separator char.

Since
2.0
setLastIdback to summary
private void setLastId(Integer lastId)
visitTreeback to summary
public boolean visitTree(VisitContext context, VisitCallback callback)

Overrides jakarta.faces.component.UIComponent.visitTree.

Doc from jakarta.faces.component.UIComponent.visitTree.

Perform a tree visit starting at this node in the tree.

UIComponent.visitTree() implementations do not invoke the VisitCallback directly, but instead call VisitContext#invokeVisitCallback to invoke the callback. This allows VisitContext implementations to provide optimized tree traversals, for example by only calling the VisitCallback for a subset of components.

UIComponent.visitTree() implementations must call UIComponent.pushComponentToEL() before performing the visit and UIComponent.popComponentFromEL() after the visit.

Parameters
context:VisitContext

the VisitContext for this visit

callback:VisitCallback

the VisitCallback instance whose visit method will be called for each node visited.

Returns:boolean

true if tree should be visited, false otherwise.

Annotations
@Override
See Also
UIComponent#visitTree
jakarta.faces.component back to summary

pack-priv final Enum UINamingContainer.PropertyKeys

extends Enum<UINamingContainer.PropertyKeys>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final UINamingContainer.PropertyKeys

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static UINamingContainer.PropertyKeys
public static UINamingContainer.PropertyKeys[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

lastIdback to summary
public static final UINamingContainer.PropertyKeys lastId

Constructor Detail

PropertyKeysback to summary
private PropertyKeys()

Method Detail

valueOfback to summary
public static UINamingContainer.PropertyKeys valueOf(String name)
valuesback to summary
public static UINamingContainer.PropertyKeys[] values()