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());
}
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);
}
Aggregations