Search in sources :

Example 1 with TagsActionParametersBase

use of org.ovirt.engine.core.common.action.TagsActionParametersBase in project ovirt-engine by oVirt.

the class TagListModel method onRemove.

public void onRemove() {
    ConfirmationModel model = (ConfirmationModel) getWindow();
    if (model.getProgress() != null) {
        return;
    }
    model.startProgress();
    Frontend.getInstance().runAction(ActionType.RemoveTag, new TagsActionParametersBase(getSelectedItem().getId()), result -> {
        TagListModel tagListModel = (TagListModel) result.getState();
        ActionReturnValue returnVal = result.getReturnValue();
        boolean success = returnVal != null && returnVal.getSucceeded();
        if (success) {
            tagListModel.getSearchCommand().execute();
        }
        tagListModel.cancel();
        tagListModel.stopProgress();
    }, this);
}
Also used : ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) TagsActionParametersBase(org.ovirt.engine.core.common.action.TagsActionParametersBase)

Aggregations

ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 TagsActionParametersBase (org.ovirt.engine.core.common.action.TagsActionParametersBase)1 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)1