use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class TagListModel method newEntity.
public void newEntity() {
if (getWindow() != null) {
return;
}
TagModel model = new TagModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().newTagTitle());
model.setHelpTag(HelpTag.new_tag);
// $NON-NLS-1$
model.setHashName("new_tag");
model.setIsNew(true);
// $NON-NLS-1$
UICommand tempVar = UICommand.createDefaultOkUiCommand("OnSave", this);
model.getCommands().add(tempVar);
// $NON-NLS-1$
UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this);
model.getCommands().add(tempVar2);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class AbstractDiskModel method forceCreationWarning.
protected void forceCreationWarning(ArrayList<String> usedLunsMessages) {
ConfirmationModel confirmationModel = new ConfirmationModel();
setConfirmWindow(confirmationModel);
confirmationModel.setTitle(constants.forceStorageDomainCreation());
confirmationModel.setMessage(constants.lunsAlreadyPartOfSD());
confirmationModel.setHelpTag(HelpTag.force_lun_disk_creation);
// $NON-NLS-1$
confirmationModel.setHashName("force_lun_disk_creation");
confirmationModel.setItems(usedLunsMessages);
// $NON-NLS-1$
UICommand forceSaveCommand = new UICommand("OnForceSave", this);
forceSaveCommand.setTitle(constants.ok());
forceSaveCommand.setIsDefault(true);
confirmationModel.getCommands().add(forceSaveCommand);
// $NON-NLS-1$
UICommand cancelconfirmCommand = new UICommand("CancelConfirm", this);
cancelconfirmCommand.setTitle(constants.cancel());
cancelconfirmCommand.setIsCancel(true);
confirmationModel.getCommands().add(cancelconfirmCommand);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class AbstractDiskModel method commonInitialize.
protected void commonInitialize() {
super.initialize();
// Create and set commands
// $NON-NLS-1$
UICommand onSaveCommand = new UICommand("OnSave", this);
onSaveCommand.setTitle(constants.ok());
onSaveCommand.setIsDefault(true);
getCommands().add(onSaveCommand);
// Add command only if defined (as cleanup is invoked on each command)
if (getCancelCommand() != null) {
getCommands().add(getCancelCommand());
}
// Update data
if (getVm() != null) {
updateBootableDiskAvailable();
getIsUsingScsiReservation().setIsAvailable(true);
}
updateDatacenters();
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class UserListModel method add.
public void add() {
if (getWindow() != null) {
return;
}
AdElementListModel model = new AdElementListModel();
if (getUserOrGroup() == UserOrGroup.Group) {
model.setSearchType(AdSearchType.GROUP);
} else {
model.setSearchType(AdSearchType.USER);
}
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().addUsersAndGroupsTitle());
model.setHelpTag(HelpTag.add_users_and_groups);
// $NON-NLS-1$
model.setHashName("add_users_and_groups");
model.setIsRoleListHidden(true);
model.getIsEveryoneSelectionHidden().setEntity(true);
// $NON-NLS-1$
UICommand addCommand = new UICommand("OnAdd", this);
addCommand.setTitle(ConstantsManager.getInstance().getConstants().add());
model.getCommands().add(addCommand);
// $NON-NLS-1$
UICommand addAndCloseCommand = new UICommand("OnAddAndClose", this);
addAndCloseCommand.setTitle(ConstantsManager.getInstance().getConstants().addAndClose());
addAndCloseCommand.setIsDefault(true);
model.getCommands().add(addAndCloseCommand);
// $NON-NLS-1$
UICommand closeCommand = new UICommand("Cancel", this);
closeCommand.setTitle(ConstantsManager.getInstance().getConstants().close());
closeCommand.setIsCancel(true);
model.getCommands().add(closeCommand);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class UserListModel method remove.
public void remove() {
if (getWindow() != null) {
return;
}
ConfirmationModel model = new ConfirmationModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().removeUsersTitle());
model.setHelpTag(HelpTag.remove_user);
// $NON-NLS-1$
model.setHashName("remove_user");
ArrayList<String> list = new ArrayList<>();
for (DbUser item : getSelectedItems()) {
list.add(item.getFirstName());
}
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