<!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].