Interface ClientBehaviorHolder
-
- All Known Implementing Classes:
HtmlBody,HtmlCommandButton,HtmlCommandLink,HtmlDataTable,HtmlForm,HtmlGraphicImage,HtmlInputFile,HtmlInputSecret,HtmlInputText,HtmlInputTextarea,HtmlOutcomeTargetButton,HtmlOutcomeTargetLink,HtmlOutputLabel,HtmlOutputLink,HtmlPanelGrid,HtmlPanelGroup,HtmlSelectBooleanCheckbox,HtmlSelectManyCheckbox,HtmlSelectManyListbox,HtmlSelectManyMenu,HtmlSelectOneListbox,HtmlSelectOneMenu,HtmlSelectOneRadio
public interface ClientBehaviorHolderThe ClientBehaviorHolder interface may be implemented by any concrete
UIComponentthat wishes to support client behaviors as defined byClientBehavior.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddClientBehavior(java.lang.String eventName, ClientBehavior behavior)Attaches aClientBehaviorto the component implementing this interface for the specified event.java.util.Map<java.lang.String,java.util.List<ClientBehavior>>getClientBehaviors()Returns a non-null, unmodifiableMapthat contains the theClientBehaviors that have been attached to the component implementing this interface.java.lang.StringgetDefaultEventName()Returns the default event name for thisClientBehaviorHolderimplementation.java.util.Collection<java.lang.String>getEventNames()Returns a non-null, unmodifiableCollectioncontaining the names of the logical events supported by the component implementing this interface.
-
-
-
Method Detail
-
addClientBehavior
void addClientBehavior(java.lang.String eventName, ClientBehavior behavior)Attaches a
ClientBehaviorto 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- theClientBehaviorinstance to attach for the specified event name.- Since:
- 2.0
-
getEventNames
java.util.Collection<java.lang.String> getEventNames()
Returns a non-null, unmodifiable
Collectioncontaining the names of the logical events supported by the component implementing this interface.- Since:
- 2.0
-
getClientBehaviors
java.util.Map<java.lang.String,java.util.List<ClientBehavior>> getClientBehaviors()
Returns a non-null, unmodifiable
Mapthat contains the theClientBehaviors that have been attached to the component implementing this interface. The keys in thisMapare event names defined bygetEventNames().- Since:
- 2.0
-
getDefaultEventName
java.lang.String getDefaultEventName()
Returns the default event name for this
ClientBehaviorHolderimplementation. This must be one of the event names returned bygetEventNames()or null if the component does not have a default event.- Since:
- 2.0
-
-