use of com.evolveum.midpoint.web.component.dialog.ConfigureTaskConfirmationPanel in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method recomputeMembersPerformed.
protected void recomputeMembersPerformed(AjaxRequestTarget target) {
StringResourceModel confirmModel;
if (getSearchBoxConfiguration().isSearchScope(SearchBoxScopeType.SUBTREE)) {
confirmModel = createStringResource("abstractRoleMemberPanel.recomputeAllSubtreeMembersConfirmationLabel");
} else {
confirmModel = getMemberTable().getSelectedObjectsCount() > 0 ? createStringResource("abstractRoleMemberPanel.recomputeSelectedMembersConfirmationLabel") : createStringResource("abstractRoleMemberPanel.recomputeAllMembersConfirmationLabel");
}
ConfigureTaskConfirmationPanel dialog = new ConfigureTaskConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), confirmModel) {
private static final long serialVersionUID = 1L;
@Override
protected PrismObject<TaskType> getTask(AjaxRequestTarget target) {
Task task = MemberOperationsHelper.createRecomputeMembersTask(getModelObject(), getQueryScope(), getActionQuery(getQueryScope(), getRelationsForRecomputeTask()), target, getPageBase());
if (task == null) {
return null;
}
PrismObject<TaskType> recomputeTask = task.getRawTaskObjectClone();
TaskType recomputeTaskType = recomputeTask.asObjectable();
recomputeTaskType.getAssignment().add(ObjectTypeUtil.createAssignmentTo(SystemObjectsType.ARCHETYPE_RECOMPUTATION_TASK.value(), ObjectTypes.ARCHETYPE, getPrismContext()));
return recomputeTask;
}
@Override
public StringResourceModel getTitle() {
return createStringResource("pageUsers.message.confirmActionPopupTitle");
}
@Override
public void yesPerformed(AjaxRequestTarget target) {
MemberOperationsHelper.createAndSubmitRecomputeMembersTask(getModelObject(), getQueryScope(), getActionQuery(getQueryScope(), getRelationsForRecomputeTask()), target, getPageBase());
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.ConfigureTaskConfirmationPanel in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method recomputeMembersPerformed.
protected void recomputeMembersPerformed(AjaxRequestTarget target) {
StringResourceModel confirmModel;
if (getSearchBoxConfiguration().isSearchScope(SearchBoxScopeType.SUBTREE)) {
confirmModel = createStringResource("abstractRoleMemberPanel.recomputeAllSubtreeMembersConfirmationLabel");
} else {
confirmModel = getMemberTable().getSelectedObjectsCount() > 0 ? createStringResource("abstractRoleMemberPanel.recomputeSelectedMembersConfirmationLabel") : createStringResource("abstractRoleMemberPanel.recomputeAllMembersConfirmationLabel");
}
ConfigureTaskConfirmationPanel dialog = new ConfigureTaskConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), confirmModel) {
private static final long serialVersionUID = 1L;
@Override
protected PrismObject<TaskType> getTask(AjaxRequestTarget target) {
Task task = MemberOperationsHelperOld.createRecomputeMembersTask(getModelObject(), getPageBase(), getQueryScope(), getActionQuery(getQueryScope(), getRelationsForRecomputeTask()), target);
if (task == null) {
return null;
}
PrismObject<TaskType> recomputeTask = task.getRawTaskObjectClone();
TaskType recomputeTaskType = recomputeTask.asObjectable();
recomputeTaskType.getAssignment().add(ObjectTypeUtil.createAssignmentTo(SystemObjectsType.ARCHETYPE_RECOMPUTATION_TASK.value(), ObjectTypes.ARCHETYPE, getPrismContext()));
return recomputeTask;
}
@Override
public StringResourceModel getTitle() {
return createStringResource("pageUsers.message.confirmActionPopupTitle");
}
@Override
public void yesPerformed(AjaxRequestTarget target) {
MemberOperationsHelperOld.recomputeMembersPerformed(getModelObject(), getPageBase(), getQueryScope(), getActionQuery(getQueryScope(), getRelationsForRecomputeTask()), target);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
Aggregations