@Override public void initialize() { super.initialize(); behavior.initialize(); initDataCenter(); }
/** The execution of the action should be done by calling this method. */ public final void runAction() { if (actionFlowState == null) { actionFlowState = new ActionFlowState(1, finalAction); } if (model.getProgress() == null) { model.startProgress(null); actionFlowState.setStartedProgress(true); } if (parallelAction != null) { parallelAction.runParallelAction(actionFlowState); } if (shouldExecute()) { internalRunAction(); } else { runNextAction(); } }
@Override public void executeCommand(UICommand command) { super.executeCommand(command); if (CMD_IMPORT.equals(command.getName())) { onImport(); } else if (CMD_CANCEL.equals(command.getName())) { cancel(); } else if (getAddImportCommand().equals(command)) { addImport(); } else if (getCancelImportCommand().equals(command)) { cancelImport(); } }
void tryToFinalize(boolean handleErrors) { if (actionFlowState.isAllDone()) { if (actionFlowState.isStartedProgress()) { model.stopProgress(); } if (handleErrors) { handleErrors(); } if (actionFlowState.getFinalAction() != null) { actionFlowState.getFinalAction().execute(); } } }
@Override public void executeCommand(UICommand command) { super.executeCommand(command); if (CMD_SAVE.equals(command.getName())) { onSave(); } else if (CMD_TEST.equals(command.getName())) { onTest(); } else if (CMD_CANCEL.equals(command.getName())) { cancel(); } else if (CMD_IMPORT_CERTIFICATE.equals(command.getName())) { importCertificate(); } else if (CMD_CANCEL_IMPORT.equals(command.getName())) { cancelImport(); } }
@Override public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) { super.eventRaised(ev, sender, args); if (ev.matchesDefinition(ListModel.selectedItemChangedEventDefinition)) { if (sender == getDataCenter()) { dataCenter_SelectedItemChanged(); } else if (sender == getHost()) { host_SelectedItemChanged(); } else if (sender == getAvailableStorageTypeItems()) { storageType_SelectedItemChanged(); } else if (sender == getAvailableStorageDomainTypeItems()) { behavior.setStorageTypeItems(); } } else if (ev.matchesDefinition(ListModel.itemsChangedEventDefinition)) { if (sender == getAvailableStorageTypeItems()) { storageItemsChanged(); } } else if (ev.matchesDefinition(NfsStorageModel.pathChangedEventDefinition)) { nfsStorageModel_PathChanged(sender); } }