org.apache.click
Class ActionEventDispatcher.EventHolder

java.lang.Object
  extended by org.apache.click.ActionEventDispatcher.EventHolder
Enclosing class:
ActionEventDispatcher

public class ActionEventDispatcher.EventHolder
extends Object

Holds the list of listeners and event sources.


Field Summary
protected  int event
          The EventHolder's event.
 
Constructor Summary
ActionEventDispatcher.EventHolder(int event)
          Create a new EventHolder for the given event.
 
Method Summary
 void clear()
          Clear the events.
 boolean fireActionEvents(Context context)
          Fire all the registered action events and return true if the page should continue processing.
 List<ActionListener> getEventListenerList()
          Return the list of event listeners.
 List<Control> getEventSourceList()
          Return the list of event sources.
 boolean hasActionEvents()
          Checks if any Action Events have been registered.
 void registerActionEvent(Control source, ActionListener listener)
          Register the event source and event ActionListener to be fired in the specified event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

event

protected int event
The EventHolder's event.

Constructor Detail

ActionEventDispatcher.EventHolder

public ActionEventDispatcher.EventHolder(int event)
Create a new EventHolder for the given event.

Parameters:
event - the EventHolder's event
Method Detail

registerActionEvent

public void registerActionEvent(Control source,
                                ActionListener listener)
Register the event source and event ActionListener to be fired in the specified event.

Parameters:
source - the action event source
listener - the event action listener

hasActionEvents

public boolean hasActionEvents()
Checks if any Action Events have been registered.

Returns:
true if the dispatcher has any Action Events registered

getEventListenerList

public List<ActionListener> getEventListenerList()
Return the list of event listeners.

Returns:
list of event listeners

getEventSourceList

public List<Control> getEventSourceList()
Return the list of event sources.

Returns:
list of event sources

clear

public void clear()
Clear the events.


fireActionEvents

public boolean fireActionEvents(Context context)
Fire all the registered action events and return true if the page should continue processing.

Parameters:
context - the page request context
Returns:
true if the page should continue processing or false otherwise