toolBar.add(
new Button("Execute", new ClickHandler() {
public void onClick(ClickEvent clickEvent)
{
JobRef selection = getSelection();
if(null==selection)
{
MessageBox.alert("Missing selection", "Please select a job!");
}
else
{
controller.handleEvent(
new Event(ExecuteJobAction.ID, selection.getId())
);
}
}
}
)