Search in sources :

Example 6 with DeleteConfirmationPanel

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

the class TreeTablePanel method deleteNodePerformed.

private void deleteNodePerformed(final SelectableBeanImpl<OrgType> orgToDelete, AjaxRequestTarget target) {
    ConfirmationPanel confirmationPanel = new DeleteConfirmationPanel(getPageBase().getMainPopupBodyId(), new IModel<String>() {

        private static final long serialVersionUID = 1L;

        @Override
        public String getObject() {
            if (hasChildren(orgToDelete)) {
                return createStringResource("TreeTablePanel.message.warn.deleteTreeObjectConfirm", WebComponentUtil.getEffectiveName(orgToDelete.getValue(), OrgType.F_DISPLAY_NAME)).getObject();
            }
            return createStringResource("TreeTablePanel.message.deleteTreeObjectConfirm", WebComponentUtil.getEffectiveName(orgToDelete.getValue(), OrgType.F_DISPLAY_NAME)).getObject();
        }
    }) {

        private static final long serialVersionUID = 1L;

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            deleteNodeConfirmedPerformed(orgToDelete, target);
        }
    };
    confirmationPanel.setOutputMarkupId(true);
    getPageBase().showMainPopup(confirmationPanel, target);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) DeleteConfirmationPanel(com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel) DeleteConfirmationPanel(com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel)

Aggregations

ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)6 DeleteConfirmationPanel (com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel)6 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)6 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)3 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 StageDefinitionDto (com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto)1 ConnectorHostType (com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorHostType)1 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)1