Top Description Methods
jakarta.faces.component

public Interface UniqueIdVendor

Known Direct Implementers
jakarta.faces.component.UIData, jakarta.faces.component.UIForm, jakarta.faces.component.UINamingContainer, jakarta.faces.component.UIViewRoot
Imports
jakarta.faces.context.FacesContext

UniqueIdVendor is an interface implemented by UIComponents that also implement NamingContainer so that they can provide unique ids based on their own clientId. This will reduce the amount of id generation variance between different renderings of the same view and is helpful for improved state saving.

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a unique-id in this component-container
createUniqueId
(FacesContext
FacesContext
context
,
String
an optional seed value - e.g. based on the position of the component in the VDL-template
seed
)

Generate an identifier for a component.

Method Detail

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

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