Top Description Fields Methods
jakarta.faces.view

public Interface AttachedObjectTarget

Known Direct Subinterfaces
jakarta.faces.view.BehaviorHolderAttachedObjectTarget, jakarta.faces.view.ValueHolderAttachedObjectTarget, jakarta.faces.view.ActionSourceAttachedObjectTarget
Known Direct Implementers
com.sun.faces.facelets.tag.composite.AttachedObjectTargetImpl
Imports
java.util.List, jakarta.faces.component.UIComponent

Within the declaration of a composite component, an AttachedObjectTarget allows the composite component author to expose the semantics of an inner component to the page author without exposing the rendering or implementation details of the inner component. See ViewDeclarationLanguage#getComponentMetadata for the context in which implementations of this interface are used.

The implementation must ensure that this instance is thread safe and may be shared among different component trees.

Subinterfaces are provided for the common behavioral interfaces: jakarta.faces.component.behavior.Behavior, jakarta.faces.component.ValueHolder, jakarta.faces.component.EditableValueHolder and jakarta.faces.component.ActionSource. The default VDL implementation must provide a corresponding Facelets tag handler for each of the subinterfaces of this interface.

Since
2.0

Field Summary

Modifier and TypeField and Description
public static final String
ATTACHED_OBJECT_TARGETS_KEY

The key in the value set of the composite component BeanDescriptor, the value for which is a List<AttachedObjectTarget>.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the attached object target
getName
()

Returns the name by which this attached object target is exposed to the page author.

public List<UIComponent>

Returns:

the result as specified above
getTargets
(UIComponent
the top level component for this composite component.
topLevelComponent
)

Returns the List<UIComponent> that this AttachedObjectTarget exposes.

Field Detail

ATTACHED_OBJECT_TARGETS_KEYback to summary
public static final String ATTACHED_OBJECT_TARGETS_KEY

The key in the value set of the composite component BeanDescriptor, the value for which is a List<AttachedObjectTarget>.

Method Detail

getNameback to summary
public String getName()

Returns the name by which this attached object target is exposed to the page author.

Returns:String

the name of the attached object target

getTargetsback to summary
public List<UIComponent> getTargets(UIComponent topLevelComponent)

Returns the List<UIComponent> that this AttachedObjectTarget exposes. Each attached object exposed by the composite component author may point at multiple UIComponent instances within the composite component. This method is used by the jakarta.faces.view.ViewDeclarationLanguage#retargetAttachedObjects method to take the appropriate action on the attached object.

Parameters
topLevelComponent:UIComponent

the top level component for this composite component.

Returns:List<UIComponent>

the result as specified above