Search in sources :

Example 11 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class PageCertDefinitions method getDeleteDefinitionConfirmationPanel.

private Popupable getDeleteDefinitionConfirmationPanel() {
    return new ConfirmationPanel(getMainPopupBodyId(), createDeleteConfirmString()) {

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                deleteDefinitionPerformed(target, singleDelete);
            }
        }
    };
}
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 12 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class PageCertCampaigns method getDeleteSelectedCampaignsConfirmationPanel.

private Popupable getDeleteSelectedCampaignsConfirmationPanel() {
    return new ConfirmationPanel(getMainPopupBodyId(), createDeleteSelectedCampaignsConfirmString()) {

        private static final long serialVersionUID = 1L;

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                deleteSelectedCampaignsConfirmedPerformed(target);
            }
        }

        @Override
        public StringResourceModel getTitle() {
            return createStringResource("PageCertCampaigns.dialog.title.confirmDeleteCampaign");
        }
    };
}
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 13 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class PageCertCampaigns method getCloseStageConfirmationPanel.

private Popupable getCloseStageConfirmationPanel() {
    return new ConfirmationPanel(getMainPopupBodyId(), createCloseStageConfirmString()) {

        private static final long serialVersionUID = 1L;

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                closeStageConfirmedPerformed(target, relevantCampaign);
            }
        }

        @Override
        public StringResourceModel getTitle() {
            return createStringResource("PageCertCampaigns.dialog.title.confirmCloseStage");
        }
    };
}
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 14 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class InlineMenuButtonColumn method showConfirmationPopup.

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

        private static final long serialVersionUID = 1L;

        @Override
        public StringResourceModel getTitle() {
            return pageBase.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.showMainPopup(dialog, target);
}
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 15 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class PageCertCampaigns method getCloseSelectedCampaignsConfirmationPanel.

private Popupable getCloseSelectedCampaignsConfirmationPanel() {
    return new ConfirmationPanel(getMainPopupBodyId(), createCloseSelectedCampaignsConfirmString()) {

        private static final long serialVersionUID = 1L;

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            ModalWindow modalWindow = findParent(ModalWindow.class);
            if (modalWindow != null) {
                modalWindow.close(target);
                closeSelectedCampaignsConfirmedPerformed(target);
            }
        }

        @Override
        public StringResourceModel getTitle() {
            return createStringResource("PageCertCampaigns.dialog.title.confirmCloseCampaign");
        }
    };
}
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)

Aggregations

ModalWindow (org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)28 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)23 ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)10 MappingEditorDialog (com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.MappingEditorDialog)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)3 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)2 LimitationsEditorDialog (com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.LimitationsEditorDialog)2 AceEditorDialog (com.evolveum.midpoint.web.page.admin.configuration.component.AceEditorDialog)2 ObjectSelectionPanel (com.evolveum.midpoint.web.page.admin.configuration.component.ObjectSelectionPanel)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)2 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)2 Label (org.apache.wicket.markup.html.basic.Label)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 ObjectBrowserPanel (com.evolveum.midpoint.gui.api.component.ObjectBrowserPanel)1 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1