Top Description Methods
jakarta.faces.component.behavior

public Interface ClientBehaviorHolder

Known Direct Implementers
jakarta.faces.component.html.HtmlBody, jakarta.faces.component.html.HtmlCommandButton, jakarta.faces.component.html.HtmlCommandLink, jakarta.faces.component.html.HtmlDataTable, jakarta.faces.component.html.HtmlForm, jakarta.faces.component.html.HtmlGraphicImage, jakarta.faces.component.html.HtmlInputFile, jakarta.faces.component.html.HtmlInputSecret, jakarta.faces.component.html.HtmlInputText, jakarta.faces.component.html.HtmlInputTextarea, jakarta.faces.component.html.HtmlOutcomeTargetButton, jakarta.faces.component.html.HtmlOutcomeTargetLink, jakarta.faces.component.html.HtmlOutputLabel, jakarta.faces.component.html.HtmlOutputLink, jakarta.faces.component.html.HtmlPanelGrid, jakarta.faces.component.html.HtmlPanelGroup, jakarta.faces.component.html.HtmlSelectBooleanCheckbox, jakarta.faces.component.html.HtmlSelectManyCheckbox, jakarta.faces.component.html.HtmlSelectManyListbox, jakarta.faces.component.html.HtmlSelectManyMenu, jakarta.faces.component.html.HtmlSelectOneListbox, jakarta.faces.component.html.HtmlSelectOneMenu, jakarta.faces.component.html.HtmlSelectOneRadio, com.sun.faces.component.PassthroughElement, com.sun.faces.facelets.tag.composite.BehaviorHolderWrapper, jakarta.faces.component.UIWebsocket
Imports
java.util.Collection, .List, .Map

The ClientBehaviorHolder interface may be implemented by any concrete jakarta.faces.component.UIComponent that wishes to support client behaviors as defined by ClientBehavior.

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
addClientBehavior(String
the logical name of the client-side event to attach the behavior to.
eventName
,
ClientBehavior
the ClientBehavior instance to attach for the specified event name.
behavior
)

Attaches a ClientBehavior to the component implementing this interface for the specified event.

public Map<String, List<ClientBehavior>>

Returns:

an unmodifiable map of client behaviors.
getClientBehaviors
()

Returns a non-null, unmodifiable Map that contains the the ClientBehaviors that have been attached to the component implementing this interface.

public String

Returns:

the default event name.
getDefaultEventName
()

Returns the default event name for this ClientBehaviorHolder implementation.

public Collection<String>

Returns:

an unmodifiable collection of event names.
getEventNames
()

Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the component implementing this interface.

Method Detail

addClientBehaviorback to summary
public void addClientBehavior(String eventName, ClientBehavior behavior)

Attaches a ClientBehavior to the component implementing this interface for the specified event. Valid event names for a UIComponent implementation are defined by ClientBehaviorHolder.getEventNames().

Parameters
eventName:String

the logical name of the client-side event to attach the behavior to.

behavior:ClientBehavior

the ClientBehavior instance to attach for the specified event name.

Since
2.0
getClientBehaviorsback to summary
public Map<String, List<ClientBehavior>> getClientBehaviors()

Returns a non-null, unmodifiable Map that contains the the ClientBehaviors that have been attached to the component implementing this interface. The keys in this Map are event names defined by getEventNames.

Returns:Map<String, List<ClientBehavior>>

an unmodifiable map of client behaviors.

Since
2.0
getDefaultEventNameback to summary
public String getDefaultEventName()

Returns the default event name for this ClientBehaviorHolder implementation. This must be one of the event names returned by getEventNames or null if the component does not have a default event.

Returns:String

the default event name.

Since
2.0
getEventNamesback to summary
public Collection<String> getEventNames()

Returns a non-null, unmodifiable Collection containing the names of the logical events supported by the component implementing this interface.

Returns:Collection<String>

an unmodifiable collection of event names.

Since
2.0