Search in sources :

Example 16 with ConfirmationPanel

use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.

the class OrgMemberPanel method deleteManagerPerformed.

private void deleteManagerPerformed(final FocusType manager, final Component summary, AjaxRequestTarget target) {
    ConfirmationPanel confirmDelete = new ConfirmationPanel(getPageBase().getMainPopupBodyId(), createStringResource("TreeTablePanel.menu.deleteManager.confirm")) {

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            OrgMemberPanel.this.deleteManagerConfirmPerformed(manager, target);
            summary.getParent().setVisible(false);
            target.add(OrgMemberPanel.this);
        }
    };
    getPageBase().showMainPopup(confirmDelete, target);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)

Example 17 with ConfirmationPanel

use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.

the class FocusProjectionsTabPanel method getDeleteProjectionPopupContent.

private Popupable getDeleteProjectionPopupContent() {
    ConfirmationPanel dialog = new ConfirmationPanel(getPageBase().getMainPopupBodyId(), new AbstractReadOnlyModel<String>() {

        private static final long serialVersionUID = 1L;

        @Override
        public String getObject() {
            return createStringResource("pageAdminFocus.message.deleteAccountConfirm", getSelectedProjections(projectionModel).size()).getString();
        }
    }) {

        private static final long serialVersionUID = 1L;

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                deleteAccountConfirmedPerformed(target, getSelectedProjections(projectionModel));
            }
        }
    };
    return dialog;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Example 18 with ConfirmationPanel

use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.

the class MenuLinkPanel method showConfirmationPopup.

private void showConfirmationPopup(InlineMenuItem menuItem, AjaxRequestTarget target) {
    ConfirmationPanel dialog = new ConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), menuItem.getConfirmationMessageModel()) {

        private static final long serialVersionUID = 1L;

        @Override
        public StringResourceModel getTitle() {
            return createStringResource("pageUsers.message.confirmActionPopupTitle");
        }

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                menuItem.getAction().onClick(target);
            }
        }
    };
    ((PageBase) getPage()).showMainPopup(dialog, target);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel) PageBase(com.evolveum.midpoint.gui.api.page.PageBase) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Aggregations

ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)18 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)18 ModalWindow (org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)10 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)4 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)1 StageDefinitionDto (com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto)1 ReportDeleteDialogDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto)1 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)1 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)1