}
private class RenameOwnerExecutor extends AbstractActionCommandExecutor {
public void execute() {
final Owner owner = getSelectedOwner();
InputApplicationDialog renameDialog = new InputApplicationDialog(owner, "firstName");
renameDialog.setTitle(getMessage("renameOwnerDialog.title"));
renameDialog.setInputLabelMessage("renameOwnerDialog.label");
renameDialog.setParentComponent(getWindowControl());
renameDialog.setFinishAction(new Block() {
public void handle(Object o) {
clinic.storeOwner(owner);
getSelectedOwnerNode().setUserObject(owner);
ownersTreeModel.nodeChanged(getSelectedOwnerNode());
}
});
// TODO check default closeAction on InputApplicationDialog
// setting closeAction explicitly to dispose, if InputApplicationDialog has this default,
// this line may be removed.
renameDialog.setCloseAction(CloseAction.DISPOSE);
renameDialog.showDialog();
}