org.apache.click
Interface Behavior

All Known Subinterfaces:
AjaxBehavior
All Known Implementing Classes:
DefaultAjaxBehavior

public interface Behavior

Behaviors provide a mechanism for changing how Controls behave at runtime. Behaviors are added to a Control and provides interceptor methods to decorate and enhance the source Control.

Behaviors provide interceptor methods for specific Control life cycle events. These interceptor methods can be implemented to further process and decorate the control or its children.

The following interceptor methods are defined:

These interceptor methods allow the Behavior to decorate a control, for example:


Method Summary
 void preDestroy(Control source)
          This event occurs before the Control onDestroy event handler.
 void preRenderHeadElements(Control source)
          This event occurs after preResponse(org.apache.click.Control), but before the Control's Control.getHeadElements() is called.
 void preResponse(Control source)
          This event occurs before the markup is written to the HttpServletResponse.
 

Method Detail

preResponse

void preResponse(Control source)
This event occurs before the markup is written to the HttpServletResponse.

Parameters:
source - the control the behavior is registered with

preRenderHeadElements

void preRenderHeadElements(Control source)
This event occurs after preResponse(org.apache.click.Control), but before the Control's Control.getHeadElements() is called.

Parameters:
source - the control the behavior is registered with

preDestroy

void preDestroy(Control source)
This event occurs before the Control onDestroy event handler. This event allows the behavior to cleanup or store Control state in the Session.

Parameters:
source - the control the behavior is registered with