use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageReports method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ReportType> table = new MainObjectListPanel<ReportType>(ID_TABLE, ReportType.class) {
private static final long serialVersionUID = 1L;
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.PAGE_REPORTS;
}
@Override
protected List<IColumn<SelectableBean<ReportType>, String>> createDefaultColumns() {
return ColumnUtils.getDefaultObjectColumns();
}
@Override
protected IColumn<SelectableBean<ReportType>, String> createCheckboxColumn() {
return null;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
return PageReports.this.createInlineMenu();
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageOrgs method initLayout.
protected void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<OrgType> table = new MainObjectListPanel<OrgType>(ID_TABLE, OrgType.class, getQueryOptions()) {
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.TABLE_ORGS;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
FocusListInlineMenuHelper<OrgType> listInlineMenuHelper = new FocusListInlineMenuHelper<OrgType>(OrgType.class, PageOrgs.this, this) {
private static final long serialVersionUID = 1L;
protected boolean isShowConfirmationDialog(ColumnMenuAction action) {
return PageOrgs.this.isShowConfirmationDialog(action);
}
protected IModel<String> getConfirmationMessageModel(ColumnMenuAction action, String actionName) {
return PageOrgs.this.getConfirmationMessageModel(action, actionName);
}
};
return listInlineMenuHelper.createRowActions(getType());
}
@Override
protected List<IColumn<SelectableBean<OrgType>, String>> createDefaultColumns() {
return ColumnUtils.getDefaultOrgColumns(getPageBase());
}
@Override
protected List<ItemPath> getFixedSearchItems() {
List<ItemPath> fixedSearchItems = new ArrayList<>();
fixedSearchItems.add(ObjectType.F_NAME);
fixedSearchItems.add(AbstractRoleType.F_DISPLAY_NAME);
fixedSearchItems.add(OrgType.F_PARENT_ORG_REF);
return fixedSearchItems;
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageTraceView method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
DropDownChoicePanel<GenericTraceVisualizationType> clockworkExecutionChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_CLOCKWORK_EXECUTION, createClockworkLevels(), new PropertyModel<>(model, TraceViewDto.F_CLOCKWORK_EXECUTION), this, false);
clockworkExecutionChoice.setOutputMarkupId(true);
mainForm.add(clockworkExecutionChoice);
DropDownChoicePanel<GenericTraceVisualizationType> clockworkClickChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_CLOCKWORK_CLICK, createClockworkLevels(), new PropertyModel<>(model, TraceViewDto.F_CLOCKWORK_CLICK), this, false);
clockworkClickChoice.setOutputMarkupId(true);
mainForm.add(clockworkClickChoice);
DropDownChoicePanel<GenericTraceVisualizationType> mappingEvaluationChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_MAPPING_EVALUATION, createMappingLevels(), new PropertyModel<>(model, TraceViewDto.F_MAPPING_EVALUATION), this, false);
mappingEvaluationChoice.setOutputMarkupId(true);
mainForm.add(mappingEvaluationChoice);
DropDownChoicePanel<GenericTraceVisualizationType> focusLoadChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_FOCUS_LOAD, createStandardLevels(), new PropertyModel<>(model, TraceViewDto.F_FOCUS_LOAD), this, false);
focusLoadChoice.setOutputMarkupId(true);
mainForm.add(focusLoadChoice);
DropDownChoicePanel<GenericTraceVisualizationType> projectionLoadChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_PROJECTION_LOAD, createStandardLevels(), new PropertyModel<>(model, TraceViewDto.F_PROJECTION_LOAD), this, false);
projectionLoadChoice.setOutputMarkupId(true);
mainForm.add(projectionLoadChoice);
DropDownChoicePanel<GenericTraceVisualizationType> focusChangeChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_FOCUS_CHANGE, createStandardLevels(), new PropertyModel<>(model, TraceViewDto.F_FOCUS_CHANGE), this, false);
focusChangeChoice.setOutputMarkupId(true);
mainForm.add(focusChangeChoice);
DropDownChoicePanel<GenericTraceVisualizationType> projectionChangeChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_PROJECTION_CHANGE, createStandardLevels(), new PropertyModel<>(model, TraceViewDto.F_PROJECTION_CHANGE), this, false);
projectionChangeChoice.setOutputMarkupId(true);
mainForm.add(projectionChangeChoice);
DropDownChoicePanel<GenericTraceVisualizationType> otherChoice = WebComponentUtil.createEnumPanel(GenericTraceVisualizationType.class, ID_OTHERS, createOthersLevels(), new PropertyModel<>(model, TraceViewDto.F_OTHERS), this, false);
otherChoice.setOutputMarkupId(true);
mainForm.add(otherChoice);
mainForm.add(new CheckBox(ID_SHOW_INVOCATION_ID, new PropertyModel<>(model, TraceViewDto.F_SHOW_INVOCATION_ID)));
mainForm.add(new CheckBox(ID_SHOW_DURATION_BEFORE, new PropertyModel<>(model, TraceViewDto.F_SHOW_DURATION_BEFORE)));
mainForm.add(new CheckBox(ID_SHOW_DURATION_AFTER, new PropertyModel<>(model, TraceViewDto.F_SHOW_DURATION_AFTER)));
mainForm.add(new CheckBox(ID_SHOW_REPO_OP_COUNT, new PropertyModel<>(model, TraceViewDto.F_SHOW_REPO_OP_COUNT)));
mainForm.add(new CheckBox(ID_SHOW_CONN_ID_OP_COUNT, new PropertyModel<>(model, TraceViewDto.F_SHOW_CONN_ID_OP_COUNT)));
mainForm.add(new CheckBox(ID_SHOW_REPO_OP_TIME, new PropertyModel<>(model, TraceViewDto.F_SHOW_REPO_OP_TIME)));
mainForm.add(new CheckBox(ID_SHOW_CONN_ID_OP_TIME, new PropertyModel<>(model, TraceViewDto.F_SHOW_CONN_ID_OP_TIME)));
AjaxSubmitButton showButton = new AjaxSubmitButton(ID_SHOW, createStringResource("PageTraceView.button.show")) {
@Override
protected void onError(AjaxRequestTarget target) {
target.add(getFeedbackPanel());
}
@Override
protected void onSubmit(AjaxRequestTarget target) {
visualize();
target.add(PageTraceView.this);
}
};
mainForm.add(showButton);
Label resultLabel = new Label(ID_RESULT_LABEL, (IModel<String>) () -> {
if (!model.getObject().isVisualized()) {
return "";
} else {
return getString("PageTraceView.trace");
}
});
mainForm.add(resultLabel);
AceEditor resultText = new AceEditor(ID_RESULT_TEXT, new PropertyModel<>(model, TraceViewDto.F_VISUALIZED_TRACE));
resultText.setReadonly(true);
resultText.setResizeToMaxHeight(true);
resultText.setMode(null);
resultText.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return model.getObject().isVisualized();
}
});
mainForm.add(resultText);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageObjectTemplates method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ObjectTemplateType> table = new MainObjectListPanel<ObjectTemplateType>(ID_TABLE, ObjectTemplateType.class) {
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.TABLE_OBJECT_TEMPLATES;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
List<InlineMenuItem> menu = new ArrayList<>();
menu.add(createDeleteInlineMenu());
return menu;
}
@Override
protected List<IColumn<SelectableBean<ObjectTemplateType>, String>> createDefaultColumns() {
return ColumnUtils.getDefaultObjectColumns();
}
@Override
protected String getNothingSelectedMessage() {
return getString("pageObjectTemplates.message.nothingSelected");
}
@Override
protected String getConfirmMessageKeyForSingleObject() {
return "pageObjectTemplates.message.confirmationMessageForMultipleObject";
}
@Override
protected String getConfirmMessageKeyForMultiObject() {
return "pageObjectTemplates.message.confirmationMessageForSingleObject";
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class AbstractShoppingCartTabPanel method initSearchPanel.
private void initSearchPanel(WebMarkupContainer shoppingCartContainer) {
final Form searchForm = new MidpointForm(ID_SEARCH_FORM);
searchForm.setOutputMarkupId(true);
IModel<Search> searchModel = Model.of(getRoleCatalogStorage().getSearch() != null ? getRoleCatalogStorage().getSearch() : createSearch());
SearchPanel search = new SearchPanel(ID_SEARCH, searchModel, false) {
private static final long serialVersionUID = 1L;
@Override
public void searchPerformed(AjaxRequestTarget target) {
AbstractShoppingCartTabPanel.this.searchPerformed(target);
}
};
getRoleCatalogStorage().setSearch(searchModel.getObject());
searchForm.add(search);
shoppingCartContainer.add(searchForm);
}
Aggregations