use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class InternalsDebugUtilPanel method onInitialize.
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
Form form = new MidpointForm(ID_FORM);
form.setOutputMarkupId(true);
add(form);
CheckFormGroup detailed = new CheckFormGroup(ID_DETAILED_DEBUG_DUMP, new PropertyModel<>(getModel(), InternalsConfigDto.F_DETAILED_DEBUG_DUMP), createStringResource("PageInternals.detailedDebugDump"), LABEL_SIZE, INPUT_SIZE);
form.add(detailed);
AjaxSubmitButton update = new AjaxSubmitButton(ID_SAVE_DEBUG_UTIL, createStringResource("PageBase.button.update")) {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
updateDebugPerformed(target);
}
@Override
protected void onError(AjaxRequestTarget target) {
target.add(getPageBase().getFeedbackPanel());
}
};
form.add(update);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class InternalsConfigPanel method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
Form form = new MidpointForm<>(ID_FORM);
form.setOutputMarkupId(true);
add(form);
form.add(createCheckbox(ID_CONSISTENCY_CHECKS, InternalsConfigDto.F_CONSISTENCY_CHECKS));
form.add(createCheckbox(ID_ENCRYPTION_CHECKS, InternalsConfigDto.F_ENCRYPTION_CHECKS));
form.add(createCheckbox(ID_READ_ENCRYPTION_CHECKS, InternalsConfigDto.F_READ_ENCRYPTION_CHECKS));
form.add(createCheckbox(ID_MODEL_PROFILING, InternalsConfigDto.F_MODEL_PROFILING));
form.add(createCheckbox(ID_TOLERATE_UNDECLARED_PREFIXES, InternalsConfigDto.F_TOLERATE_UNDECLARED_PREFIXES));
AjaxSubmitButton update = new AjaxSubmitButton(ID_UPDATE_INTERNALS_CONFIG, createStringResource("PageBase.button.update")) {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
updateInternalConfig(target);
}
@Override
protected void onError(AjaxRequestTarget target) {
target.add(getPageBase().getFeedbackPanel());
}
};
form.add(update);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class ProgressPanel method initLayout.
private void initLayout() {
MidpointForm progressForm = new MidpointForm<>(ID_PROGRESS_FORM, true);
add(progressForm);
WebMarkupContainer contentsPanel = new WebMarkupContainer(ID_CONTENTS_PANEL);
contentsPanel.setOutputMarkupId(true);
progressForm.add(contentsPanel);
ListView<ProgressReportActivityDto> statusItemsListView = new ListView<>(ID_ACTIVITIES, (IModel<List<ProgressReportActivityDto>>) () -> {
ProgressReporter reporter = reporterModel.getProcessData();
ProgressDto progressDto = reporter.getProgress();
return progressDto.getProgressReportActivities();
}) {
@Override
protected void populateItem(ListItem<ProgressReportActivityDto> item) {
populateStatusItem(item);
}
};
contentsPanel.add(statusItemsListView);
StatisticsDtoModel statisticsModel = new StatisticsDtoModel();
statisticsPanel = new StatisticsPanel(ID_STATISTICS, statisticsModel);
contentsPanel.add(statisticsPanel);
ListView<String> logItemsListView = new ListView<>(ID_LOG_ITEMS, (IModel<List<String>>) () -> {
ProgressReporter reporter = reporterModel.getProcessData();
ProgressDto progressDto = reporter.getProgress();
return progressDto.getLogItems();
}) {
@Override
protected void populateItem(ListItem item) {
item.add(new Label(ID_LOG_ITEM, item.getModel()));
}
};
contentsPanel.add(logItemsListView);
Label executionTime = new Label(ID_EXECUTION_TIME, (IModel<String>) () -> {
ProgressReporter reporter = reporterModel.getProcessData();
if (reporter.getOperationDurationTime() > 0) {
return getString("ProgressPanel.ExecutionTimeWhenFinished", reporter.getOperationDurationTime());
} else if (reporter.getOperationStartTime() > 0) {
return getString("ProgressPanel.ExecutionTimeWhenRunning", (System.currentTimeMillis() - reporter.getOperationStartTime()) / 1000);
} else {
return null;
}
});
contentsPanel.add(executionTime);
initButtons(progressForm);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageFocusPreviewChanges method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
mainForm.setMultiPart(true);
add(mainForm);
List<ITab> tabs = createTabs();
TabbedPanel<ITab> previewChangesTabbedPanel = WebComponentUtil.createTabPanel(ID_TABBED_PANEL, this, tabs, null);
previewChangesTabbedPanel.setOutputMarkupId(true);
mainForm.add(previewChangesTabbedPanel);
initButtons(mainForm);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageDebugList method initLayout.
private void initLayout() {
Form<?> main = new MidpointForm<>(ID_MAIN_FORM);
add(main);
RepositoryObjectDataProvider<? extends ObjectType> provider = new RepositoryObjectDataProvider<>(this, (IModel) searchModel) {
private static final long serialVersionUID = 1L;
@Override
protected PageStorage getPageStorage() {
return getSessionStorage().getConfiguration();
}
};
create(provider);
PageDebugDownloadBehaviour ajaxDownloadBehavior = new PageDebugDownloadBehaviour();
main.add(ajaxDownloadBehavior);
}
Aggregations