use of com.evolveum.midpoint.gui.api.component.MainObjectListPanel in project midpoint by Evolveum.
the class ResourceContentPanel method initLayout.
private void initLayout() {
WebMarkupContainer totals = new WebMarkupContainer(ID_TOTALS);
totals.setOutputMarkupId(true);
add(totals);
initShadowStatistics(totals);
MainObjectListPanel<ShadowType> shadowListPanel = new MainObjectListPanel<>(ID_TABLE, ShadowType.class, createSearchOptions(), getPanelConfiguration()) {
private static final long serialVersionUID = 1L;
@Override
protected List<InlineMenuItem> createInlineMenu() {
return ResourceContentPanel.this.createRowMenuItems();
}
@Override
protected List<IColumn<SelectableBean<ShadowType>, String>> createDefaultColumns() {
return ResourceContentPanel.this.initColumns();
}
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, ShadowType object) {
shadowDetailsPerformed(target, WebComponentUtil.getName(object), object.getOid());
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected UserProfileStorage.TableId getTableId() {
return ResourceContentPanel.this.getTableId();
}
@Override
public PageStorage getPageStorage() {
return getPageBase().getSessionStorage().getResourceContentStorage(kind, searchMode);
}
@Override
protected ISelectableDataProvider createProvider() {
provider = createSelectableBeanObjectDataProvider(() -> getResourceContentQuery(), null);
provider.setEmptyListOnNullQuery(true);
provider.setSort(null);
provider.setDefaultCountIfNull(Integer.MAX_VALUE);
return provider;
}
@Override
protected Search createSearch(Class<ShadowType> type) {
return ResourceContentPanel.this.createSearch();
}
@Override
protected CompiledObjectCollectionView getObjectCollectionView() {
CompiledShadowCollectionView compiledView = findContainerPanelConfig();
if (compiledView != null) {
return compiledView;
}
return super.getObjectCollectionView();
}
};
shadowListPanel.setOutputMarkupId(true);
shadowListPanel.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return createQuery() != null;
}
});
shadowListPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_SHADOW_BOX_CSS_CLASSES);
add(shadowListPanel);
Label label = new Label(ID_LABEL, "Nothing to show. Select intent to search");
add(label);
label.setOutputMarkupId(true);
label.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return createQuery() == null;
}
});
initButton(ID_IMPORT, "Import", " fa-download", SystemObjectsType.ARCHETYPE_IMPORT_TASK.value());
initButton(ID_RECONCILIATION, "Reconciliation", " fa-link", SystemObjectsType.ARCHETYPE_RECONCILIATION_TASK.value());
initButton(ID_LIVE_SYNC, "Live Sync", " fa-refresh", SystemObjectsType.ARCHETYPE_LIVE_SYNC_TASK.value());
initCustomLayout();
}
use of com.evolveum.midpoint.gui.api.component.MainObjectListPanel in project midpoint by Evolveum.
the class PageConnectorHosts method initLayout.
protected void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ConnectorHostType> table = new MainObjectListPanel<ConnectorHostType>(ID_TABLE, ConnectorHostType.class, getQueryOptions()) {
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, ConnectorHostType host) {
}
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
return createRowActions();
}
@Override
protected List<IColumn<SelectableBean<ConnectorHostType>, String>> createDefaultColumns() {
return PageConnectorHosts.this.initColumns();
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected boolean isObjectDetailsEnabled(IModel<SelectableBean<ConnectorHostType>> rowModel) {
return false;
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.gui.api.component.MainObjectListPanel 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.gui.api.component.MainObjectListPanel 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.gui.api.component.MainObjectListPanel 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);
}
Aggregations