Top Description Methods
jakarta.faces.component.behavior

public Interface Behavior

Known Direct Subinterfaces
jakarta.faces.component.behavior.ClientBehavior
Known Direct Implementers
jakarta.faces.component.behavior.BehaviorBase
Imports
jakarta.faces.component.UIComponent, jakarta.faces.event.BehaviorEvent

The Behavior interface is the root API of the component behavior model. Behaviors are objects that are attached to UIComponents in order to enhance components with functionality not explicitly defined by the component implementation itself. The component behavior API is intended to support different types of behavior contracts, and possibly different types of interactions between behaviors and components. The first such contract is the ClientBehavior, which defines a mechanism by which script-producing behaviors attach scripts to components for execution on the client. In the future other types of behavior contracts may be added.

Like other attached objects (converters, validators) Behavior instances are created via the jakarta.faces.application.Application object. See jakarta.faces.application.Application#createBehavior for more details.

Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
broadcast(BehaviorEvent
The BehaviorEvent to be broadcast
event
)

Broadcast the specified BehaviorEvent to all registered event listeners who have expressed an interest in events of this type.

Method Detail

broadcastback to summary
public void broadcast(BehaviorEvent event)

Broadcast the specified BehaviorEvent to all registered event listeners who have expressed an interest in events of this type. Listeners are called in the order in which they were added.

Parameters
event:BehaviorEvent

The BehaviorEvent to be broadcast

Exceptions
AbortProcessingException:
Signal the Jakarta Faces implementation that no further processing on the current event should be performed
IllegalArgumentException:
if the implementation class of this BehaviorEvent is not supported by this component
NullPointerException:
if event is null
Since
2.0