Search in sources :

Example 1 with StageDefinitionDto

use of com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto in project midpoint by Evolveum.

the class DefinitionStagesPanel method deletePerformed.

private void deletePerformed(AjaxRequestTarget target) {
    ConfirmationPanel dialog = new ConfirmationPanel(getPageBase().getMainPopupBodyId(), new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            StageDefinitionDto dto = getModelObject().get(tabPanel.getSelectedTab());
            return getString("DefinitionStagesPanel.confirmDeleteText", dto.getName());
        }
    }) {

        @Override
        public void yesPerformed(AjaxRequestTarget target) {
            getPageBase().hideMainPopup(target);
            deleteConfirmedPerformed(target);
        }
    };
    getPageBase().showMainPopup(dialog, target);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) StageDefinitionDto(com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)

Example 2 with StageDefinitionDto

use of com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto in project midpoint by Evolveum.

the class DefinitionStagesPanel method createNewStageDefinitionDto.

private StageDefinitionDto createNewStageDefinitionDto() {
    try {
        AccessCertificationStageDefinitionType def = new AccessCertificationStageDefinitionType(parentPage.getPrismContext());
        def.setNumber(getModel().getObject().size() + 1);
        def.setName(DEFAULT_STAGE_NAME_PREFIX + def.getNumber());
        return new StageDefinitionDto(def, parentPage.getPrismContext());
    } catch (SchemaException e) {
        throw new IllegalStateException(e);
    }
}
Also used : SchemaException(com.evolveum.midpoint.util.exception.SchemaException) AccessCertificationStageDefinitionType(com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationStageDefinitionType) StageDefinitionDto(com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto)

Example 3 with StageDefinitionDto

use of com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto in project midpoint by Evolveum.

the class DefinitionStagesPanel method addPerformed.

private void addPerformed(AjaxRequestTarget target) {
    StageDefinitionDto newStageDefinitionDto = createNewStageDefinitionDto();
    getModelObject().add(newStageDefinitionDto);
    recreateTabs();
    tabPanel.setSelectedTab(getModelObject().size() - 1);
    target.add(parentPage.getTabPanel());
}
Also used : StageDefinitionDto(com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto)

Aggregations

StageDefinitionDto (com.evolveum.midpoint.web.page.admin.certification.dto.StageDefinitionDto)3 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)1 ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)1 AccessCertificationStageDefinitionType (com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationStageDefinitionType)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1