- All Known Implementing Classes:
BehaviorHolderWrapper
,HtmlBody
,HtmlCommandButton
,HtmlCommandLink
,HtmlDataTable
,HtmlForm
,HtmlGraphicImage
,HtmlInputFile
,HtmlInputSecret
,HtmlInputText
,HtmlInputTextarea
,HtmlOutcomeTargetButton
,HtmlOutcomeTargetLink
,HtmlOutputLabel
,HtmlOutputLink
,HtmlPanelGrid
,HtmlPanelGroup
,HtmlSelectBooleanCheckbox
,HtmlSelectManyCheckbox
,HtmlSelectManyListbox
,HtmlSelectManyMenu
,HtmlSelectOneListbox
,HtmlSelectOneMenu
,HtmlSelectOneRadio
,PassthroughElement
,UIWebsocket
The ClientBehaviorHolder interface may be implemented by any concrete
UIComponent
that wishes to support client behaviors as defined by
ClientBehavior
.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientBehavior
(String eventName, ClientBehavior behavior) Attaches aClientBehavior
to the component implementing this interface for the specified event.Returns a non-null, unmodifiableMap
that contains the theClientBehavior
s that have been attached to the component implementing this interface.Returns the default event name for thisClientBehaviorHolder
implementation.Returns a non-null, unmodifiableCollection
containing the names of the logical events supported by the component implementing this interface.
-
Method Details
-
addClientBehavior
Attaches a
ClientBehavior
to the component implementing this interface for the specified event. Valid event names for a UIComponent implementation are defined byClientBehaviorHolder.getEventNames()
.- Parameters:
eventName
- the logical name of the client-side event to attach the behavior to.behavior
- theClientBehavior
instance to attach for the specified event name.- Since:
- 2.0
-
getEventNames
Collection<String> getEventNames()Returns a non-null, unmodifiable
Collection
containing the names of the logical events supported by the component implementing this interface.- Returns:
- an unmodifiable collection of event names.
- Since:
- 2.0
-
getClientBehaviors
Map<String,List<ClientBehavior>> getClientBehaviors()Returns a non-null, unmodifiable
Map
that contains the theClientBehavior
s that have been attached to the component implementing this interface. The keys in thisMap
are event names defined bygetEventNames()
.- Returns:
- an unmodifiable map of client behaviors.
- Since:
- 2.0
-
getDefaultEventName
String getDefaultEventName()Returns the default event name for this
ClientBehaviorHolder
implementation. This must be one of the event names returned bygetEventNames()
or null if the component does not have a default event.- Returns:
- the default event name.
- Since:
- 2.0
-