Search in sources :

Example 1 with AssignmentConflictPanel

use of com.evolveum.midpoint.web.page.self.component.AssignmentConflictPanel in project midpoint by Evolveum.

the class PageAssignmentConflicts method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    mainForm.setOutputMarkupId(true);
    add(mainForm);
    RepeatingView conflictsPanel = new RepeatingView(ID_CONFLICTS_PANEL);
    conflictsPanel.setOutputMarkupId(true);
    List<AssignmentConflictDto> conflicts = getSessionStorage().getRoleCatalog().getConflictsList();
    for (AssignmentConflictDto dto : conflicts) {
        AssignmentConflictPanel panel = new AssignmentConflictPanel(conflictsPanel.newChildId(), Model.of(dto));
        conflictsPanel.add(panel);
    }
    mainForm.add(conflictsPanel);
    AjaxSubmitButton back = new AjaxSubmitButton(ID_BACK, createStringResource("PageAssignmentConflicts.back")) {

        @Override
        public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
            redirectBack();
        }
    };
    mainForm.add(back);
    AjaxSubmitButton submit = new AjaxSubmitButton(ID_SUBMIT, createStringResource("PageAssignmentConflicts.submit")) {

        @Override
        public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
            redirectBack();
        }
    };
    mainForm.add(submit);
}
Also used : AssignmentConflictDto(com.evolveum.midpoint.web.page.self.dto.AssignmentConflictDto) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(com.evolveum.midpoint.web.component.form.Form) RepeatingView(org.apache.wicket.markup.repeater.RepeatingView) AssignmentConflictPanel(com.evolveum.midpoint.web.page.self.component.AssignmentConflictPanel)

Aggregations

AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)1 Form (com.evolveum.midpoint.web.component.form.Form)1 AssignmentConflictPanel (com.evolveum.midpoint.web.page.self.component.AssignmentConflictPanel)1 AssignmentConflictDto (com.evolveum.midpoint.web.page.self.dto.AssignmentConflictDto)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 RepeatingView (org.apache.wicket.markup.repeater.RepeatingView)1