code: private void initStandardCommands() {
  		finishCommand = new ActionCommand(getFinishCommandId()) {
  			public void doExecuteCommand() {
  				boolean result = onFinish();
  				if (result) {
  					if (getDisplayFinishSuccessMessage()) {
  						showFinishSuccessMessageDialog();
  					}
  					executeCloseAction();
  				}
  			}
  		};
  		finishCommand.setSecurityControllerId(getFinishSecurityControllerId());
  		finishCommand.setEnabled(defaultEnabled);
  
  		cancelCommand = new ActionCommand(getCancelCommandId()) {
  
  			public void doExecuteCommand() {
  				onCancel();
  			}
  		};
  	}
docs: Initialize the standard commands needed on a Dialog: Ok/Cancel.