Search in sources :

Example 1 with InternalOperationClasses

use of com.evolveum.midpoint.schema.internals.InternalOperationClasses in project midpoint by Evolveum.

the class InternalsTracesPanel method updateTraces.

private void updateTraces(AjaxRequestTarget target) {
    for (Entry<String, Boolean> entry : tracesMap.entrySet()) {
        InternalOperationClasses ioc = findInternalOperationClass(entry.getKey());
        if (ioc == null) {
            continue;
        }
        InternalMonitor.setTrace(ioc, entry.getValue());
    }
    LOGGER.trace("Updated traces: {}", tracesMap);
    success(getString("PageInternals.message.tracesUpdate"));
    target.add(getPageBase().getFeedbackPanel(), getInternalsConfigForm());
}
Also used : InternalOperationClasses(com.evolveum.midpoint.schema.internals.InternalOperationClasses)

Example 2 with InternalOperationClasses

use of com.evolveum.midpoint.schema.internals.InternalOperationClasses in project midpoint by Evolveum.

the class InternalsTracesPanel method onInitialize.

protected void onInitialize() {
    super.onInitialize();
    setOutputMarkupId(true);
    Form form = new MidpointForm<>(ID_FORM);
    form.setOutputMarkupId(true);
    add(form);
    ListView<InternalOperationClasses> tracesTable = new ListView<InternalOperationClasses>(ID_TRACES_TABLE, Arrays.asList(InternalOperationClasses.values())) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(ListItem<InternalOperationClasses> item) {
            InternalOperationClasses operationClass = item.getModelObject();
            CheckFormGroup checkFormGroup = new CheckFormGroup(ID_TRACE_TOGGLE, new PropertyModel<>(tracesMap, operationClass.getKey()), createStringResource("InternalOperationClasses." + operationClass.getKey()), LABEL_SIZE, INPUT_SIZE);
            item.add(checkFormGroup);
        }
    };
    form.add(tracesTable);
    AjaxSubmitButton update = new AjaxSubmitButton(ID_UPDATE_TRACES, createStringResource("PageBase.button.update")) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            updateTraces(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target) {
            target.add(getPageBase().getFeedbackPanel());
        }
    };
    form.add(update);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InternalOperationClasses(com.evolveum.midpoint.schema.internals.InternalOperationClasses) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) ListView(org.apache.wicket.markup.html.list.ListView) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) ListItem(org.apache.wicket.markup.html.list.ListItem) CheckFormGroup(com.evolveum.midpoint.web.component.form.CheckFormGroup)

Aggregations

InternalOperationClasses (com.evolveum.midpoint.schema.internals.InternalOperationClasses)2 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)1 CheckFormGroup (com.evolveum.midpoint.web.component.form.CheckFormGroup)1 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 Form (org.apache.wicket.markup.html.form.Form)1 ListItem (org.apache.wicket.markup.html.list.ListItem)1 ListView (org.apache.wicket.markup.html.list.ListView)1