net.sf.click
Interface ActionListener

All Known Implementing Classes:
ActionListenerAdaptor

public interface ActionListener

Provides a listener interface for receiving Control action events. The usage model is similar to the java.awt.event.ActionListener interface.

The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a control, using the controls's setActionListener method. When the action event occurs, that object's onAction method is invoked.

Listener Example

An ActionListener example is provided below:
 public MyPage extends Page {

    public ActionLink link = new ActionLink();

    public MyPage() {

       link.setActionListener(new ActionListener() {
           public boolean onAction(Control source) {
               return onLinkClick();
           }
        });
    }

    public boolean onLinkClick() {
       ..
       return true;
    }
 }
 

Author:
Malcolm Edgar, Bob Schellink

Method Summary
 boolean onAction(Control source)
          Return true if the control and page processing should continue, or false otherwise.
 

Method Detail

onAction

public boolean onAction(Control source)
Return true if the control and page processing should continue, or false otherwise.

Parameters:
source - the source of the action event
Returns:
true if control and page processing should continue or false otherwise.