use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class BookmarkListModel method remove.
public void remove() {
if (getWindow() != null) {
return;
}
ConfirmationModel model = new ConfirmationModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().removeBookmarksTitle());
model.setHelpTag(HelpTag.remove_bookmark);
// $NON-NLS-1$
model.setHashName("remove_bookmark");
ArrayList<String> list = new ArrayList<>();
list.add(((Bookmark) getSelectedItem()).getName());
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);
}
use of org.ovirt.engine.ui.uicommonweb.UICommand in project ovirt-engine by oVirt.
the class BookmarkListModel method newEntity.
public void newEntity() {
if (getWindow() != null) {
return;
}
BookmarkModel model = new BookmarkModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().newBookmarkTitle());
model.setHelpTag(HelpTag.new_bookmark);
// $NON-NLS-1$
model.setHashName("new_bookmark");
model.setIsNew(true);
model.getSearchString().setEntity(getSearchString());
// $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 BookmarkListModel method edit.
public void edit() {
org.ovirt.engine.core.common.businessentities.Bookmark bookmark = (org.ovirt.engine.core.common.businessentities.Bookmark) getSelectedItem();
if (getWindow() != null) {
return;
}
BookmarkModel model = new BookmarkModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().editBookmarkTitle());
model.setHelpTag(HelpTag.edit_bookmark);
// $NON-NLS-1$
model.setHashName("edit_bookmark");
model.setIsNew(false);
model.getName().setEntity(bookmark.getName());
model.getSearchString().setEntity(bookmark.getValue());
// $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 PermissionListModel method add.
private void add() {
if (getWindow() != null) {
return;
}
AdElementListModel model = adElementListModelProvider.get();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().addPermissionToUserTitle());
model.setHelpTag(HelpTag.add_permission_to_user);
// $NON-NLS-1$
model.setHashName("add_permission_to_user");
// $NON-NLS-1$
UICommand tempVar = UICommand.createDefaultOkUiCommand("OnAdd", 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 SystemPermissionListModel method remove.
private void remove() {
if (getWindow() != null) {
return;
}
ConfirmationModel model = new ConfirmationModel();
setWindow(model);
model.setTitle(ConstantsManager.getInstance().getConstants().removeSystemPermissionsTitle());
model.setHelpTag(HelpTag.remove_system_permission);
// $NON-NLS-1$
model.setHashName("remove_system_permission");
model.setItems(getSelectedItems());
// $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