Search in sources :

Example 1 with TsaValidator

use of com.evolveum.midpoint.web.page.admin.server.dto.TsaValidator in project midpoint by Evolveum.

the class PageTaskAdd method initAdvanced.

private void initAdvanced(Form mainForm) {
    CheckBox runUntilNodeDown = new CheckBox(ID_RUN_UNTIL_NODW_DOWN, new PropertyModel<Boolean>(model, TaskAddDto.F_RUN_UNTIL_NODW_DOWN));
    mainForm.add(runUntilNodeDown);
    final IModel<Boolean> createSuspendedCheck = new PropertyModel<>(model, TaskAddDto.F_SUSPENDED_STATE);
    CheckBox createSuspended = new CheckBox(ID_CREATE_SUSPENDED, createSuspendedCheck);
    mainForm.add(createSuspended);
    DropDownChoice threadStop = new DropDownChoice<>(ID_THREAD_STOP, new Model<ThreadStopActionType>() {

        @Override
        public ThreadStopActionType getObject() {
            TaskAddDto dto = model.getObject();
            //				}
            return dto.getThreadStop();
        }

        @Override
        public void setObject(ThreadStopActionType object) {
            model.getObject().setThreadStop(object);
        }
    }, WebComponentUtil.createReadonlyModelFromEnum(ThreadStopActionType.class), new EnumChoiceRenderer<ThreadStopActionType>(PageTaskAdd.this));
    mainForm.add(threadStop);
    mainForm.add(new TsaValidator(runUntilNodeDown, threadStop));
    DropDownChoice misfire = new DropDownChoice<>(ID_MISFIRE_ACTION, new PropertyModel<MisfireActionType>(model, TaskAddDto.F_MISFIRE_ACTION), WebComponentUtil.createReadonlyModelFromEnum(MisfireActionType.class), new EnumChoiceRenderer<MisfireActionType>(PageTaskAdd.this));
    mainForm.add(misfire);
}
Also used : TaskAddDto(com.evolveum.midpoint.web.page.admin.server.dto.TaskAddDto) PropertyModel(org.apache.wicket.model.PropertyModel) ThreadStopActionType(com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) CheckBox(org.apache.wicket.markup.html.form.CheckBox) AjaxCheckBox(org.apache.wicket.ajax.markup.html.form.AjaxCheckBox) TsaValidator(com.evolveum.midpoint.web.page.admin.server.dto.TsaValidator) MisfireActionType(com.evolveum.midpoint.xml.ns._public.common.common_3.MisfireActionType)

Aggregations

TaskAddDto (com.evolveum.midpoint.web.page.admin.server.dto.TaskAddDto)1 TsaValidator (com.evolveum.midpoint.web.page.admin.server.dto.TsaValidator)1 MisfireActionType (com.evolveum.midpoint.xml.ns._public.common.common_3.MisfireActionType)1 ThreadStopActionType (com.evolveum.midpoint.xml.ns._public.common.common_3.ThreadStopActionType)1 AjaxCheckBox (org.apache.wicket.ajax.markup.html.form.AjaxCheckBox)1 CheckBox (org.apache.wicket.markup.html.form.CheckBox)1 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)1 PropertyModel (org.apache.wicket.model.PropertyModel)1