|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBehavior
Behaviors are kind of plug-ins for Components. They allow to be added to a component and get essential events forwarded by the component. they can be bound to a concrete component (using the bind method is called when the behavior is attached), but they don't need to. They can modify the components markup by changing the rendered ComponentTag. Behaviors can have their own models as well, and they are notified when these are to be detached by the component.
It is recommended that you extend from
AbstractBehavior instead of directly implementing
this interface.
IBehaviorListener,
IHeaderContributor,
AbstractAjaxBehavior,
AttributeModifier| Method Summary | |
|---|---|
void |
bind(Component component)
Bind this handler to the given component. |
void |
detachModel(Component component)
Provides for the ability to detach any models this behavior has. |
void |
exception(Component component,
java.lang.RuntimeException exception)
In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior. |
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag. |
void |
rendered(Component component)
Called when a component that has this behavior coupled was rendered. |
| Method Detail |
|---|
void bind(Component component)
component - the component to bind tovoid detachModel(Component component)
component - the component that initiates the detachement of this behavior
void onComponentTag(Component component,
ComponentTag tag)
component - the component that renders this tag currentlytag - the tag that is renderedvoid rendered(Component component)
component - the component that has this behavior coupled
void exception(Component component,
java.lang.RuntimeException exception)
rendered(Component), you should do the same in the
implementation of this method.
component - the component that has a reference to this behavior and during
which processing the exception occuredexception - the unexpected exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||