Search in sources :

Example 26 with UICommand

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

Example 27 with UICommand

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

Example 28 with UICommand

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

Example 29 with UICommand

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

Example 30 with UICommand

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);
}
Also used : Quota(org.ovirt.engine.core.common.businessentities.Quota) ArrayList(java.util.ArrayList) 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