Search in sources :

Example 11 with UICommand

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);
}
Also used : ArrayList(java.util.ArrayList) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)

Example 12 with UICommand

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);
}
Also used : UICommand(org.ovirt.engine.ui.uicommonweb.UICommand)

Example 13 with UICommand

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);
}
Also used : Bookmark(org.ovirt.engine.core.common.businessentities.Bookmark) Bookmark(org.ovirt.engine.core.common.businessentities.Bookmark) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand)

Example 14 with UICommand

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);
}
Also used : UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) AdElementListModel(org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel)

Example 15 with UICommand

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);
}
Also used : UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)

Aggregations

UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)257 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)134 ArrayList (java.util.ArrayList)105 List (java.util.List)49 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)49 HelpTag (org.ovirt.engine.ui.uicommonweb.help.HelpTag)49 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)48 ActionType (org.ovirt.engine.core.common.action.ActionType)47 Frontend (org.ovirt.engine.ui.frontend.Frontend)47 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)44 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)41 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)36 Guid (org.ovirt.engine.core.compat.Guid)36 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)33 QueryType (org.ovirt.engine.core.common.queries.QueryType)33 VDS (org.ovirt.engine.core.common.businessentities.VDS)30 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)29 Linq (org.ovirt.engine.ui.uicommonweb.Linq)28 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)26 ApplicationMode (org.ovirt.engine.core.common.mode.ApplicationMode)24