use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class RegisterEntityModel method initialize.
@Override
public void initialize() {
super.initialize();
// Create and set commands
// $NON-NLS-1$
UICommand onSaveCommand = UICommand.createDefaultOkUiCommand("OnSave", this);
getCommands().add(onSaveCommand);
getCommands().add(getCancelCommand());
updateClusters();
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class NewExternalSubnetModel method initCommands.
protected void initCommands() {
// $NON-NLS-1$
UICommand okCommand = UICommand.createDefaultOkUiCommand("OnSave", this);
getCommands().add(okCommand);
// $NON-NLS-1$
UICommand cancelCommand = UICommand.createCancelUiCommand("Cancel", this);
getCommands().add(cancelCommand);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class VnicProfileModel method initCommands.
protected void initCommands() {
// $NON-NLS-1$
UICommand okCommand = UICommand.createDefaultOkUiCommand("OnSave", this);
getCommands().add(okCommand);
// $NON-NLS-1$
UICommand cancelCommand = UICommand.createCancelUiCommand("Cancel", this);
getCommands().add(cancelCommand);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class EditProviderModel method showConfirmation.
private void showConfirmation() {
if (providedNetworks.isEmpty()) {
actualSave();
return;
}
// $NON-NLS-1$
StringBuilder networkList = new StringBuilder("Networks:\n");
for (Network network : providedNetworks) {
// $NON-NLS-1$
networkList.append("- ").append(network.getName()).append('\n');
}
ConfirmationModel confirmationModel = new ConfirmationModel();
confirmationModel.setTitle(ConstantsManager.getInstance().getConstants().providerUrlWarningTitle());
confirmationModel.setMessage(ConstantsManager.getInstance().getMessages().providerUrlWarningText(networkList.toString()));
UICommand cmdOk = UICommand.createDefaultOkUiCommand(CMD_APPROVE, this);
confirmationModel.getCommands().add(cmdOk);
// $NON-NLS-1$
UICommand cmdCancel = UICommand.createCancelUiCommand(CMD_CANCEL, this);
confirmationModel.getCommands().add(cmdCancel);
sourceListModel.setConfirmWindow(confirmationModel);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class QuotaListModel method remove.
public void remove() {
if (getWindow() != null) {
return;
}
ConfirmationModel model = new ConfirmationModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().removeQuotasTitle());
model.setHelpTag(HelpTag.remove_quota);
// $NON-NLS-1$
model.setHashName("remove_quota");
ArrayList<String> list = new ArrayList<>();
for (Quota a : getSelectedItems()) {
list.add(a.getQuotaName());
}
model.setItems(list);
// $NON-NLS-1$
UICommand tempVar = UICommand.createDefaultOkUiCommand("OnRemove", this);
model.getCommands().add(tempVar);
// $NON-NLS-1$
UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this);
model.getCommands().add(tempVar2);
}
Aggregations