<!DOCTYPE menu PUBLIC
"-//Apache Software Foundation//DTD Click Menu 2.2//EN"
"http://click.apache.org/dtds/menu-2.2.dtd">
<!DOCTYPE click-app PUBLIC
"-//Apache Software Foundation//DTD Click Configuration 2.2//EN"
"http://click.apache.org/dtds/click-2.2.dtd">
<!DOCTYPE click-app PUBLIC
"-//Apache Software Foundation//DTD Click Configuration 2.1//EN"
"http://click.apache.org/dtds/click-2.1.dtd">
public class MyPage extends Page {
public void onInit() {
Submit submit = new Submit("submit");
submit.setActionListener(new ActionListener() {
public boolean onAction(Control source) {
// Perform submit action and return true to continue processing
return true;
}
});
}
}
Note that the source Control is passed in as an argument to the onAction method.
For very complex scenarios it is useful to know which Control triggered the event
[369].