use of org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn in project midpoint by Evolveum.
the class PageResources method initLayout.
protected void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ResourceType> table = new MainObjectListPanel<ResourceType>(ID_TABLE, ResourceType.class, getQueryOptions()) {
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, ResourceType object) {
clearSessionStorageForResourcePage();
super.objectDetailsPerformed(target, object);
}
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.TABLE_RESOURCES;
}
@Override
protected List<IColumn<SelectableBean<ResourceType>, String>> createDefaultColumns() {
return PageResources.this.initResourceColumns();
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
return PageResources.this.createRowMenuItems();
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
table.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_RESOURCE_BOX_CSS_CLASSES);
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn 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 org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn in project midpoint by Evolveum.
the class ReportMainPanel method createObjectListForColumns.
private WebMarkupContainer createObjectListForColumns(String panelId, PageAdminObjectDetails<ReportType> parentPage) {
return new BasicMultivalueContainerListPanel<>(panelId, GuiObjectColumnType.class) {
@Override
protected MultivalueContainerDetailsPanel<GuiObjectColumnType> getMultivalueContainerDetailsPanel(ListItem<PrismContainerValueWrapper<GuiObjectColumnType>> item) {
return createDetailsPanelForColumn(ID_ITEM_DETAILS, item);
}
@Override
protected String getContainerNameForNewButton() {
return getPageBase().createStringResource("GuiObjectListViewType.column").getString();
}
@Override
protected IModel<PrismContainerWrapper<GuiObjectColumnType>> getContainerModel() {
return PrismContainerWrapperModel.fromContainerWrapper(ReportMainPanel.this.getObjectModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_VIEW, GuiObjectListViewType.F_COLUMN));
}
@Override
protected Component createHeader(String headerId) {
Label label = new Label(headerId, getPageBase().createStringResource("EngineReportTabPanel.columns"));
label.add(AttributeAppender.append("style", "padding-bottom:10px; font-size: 16px; font-weight: 600; color: #3c8dbc;"));
return label;
}
@Override
protected List<IColumn<PrismContainerValueWrapper<GuiObjectColumnType>, String>> createDefaultColumns() {
return createColumnsForColumns(parentPage);
}
};
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn in project midpoint by Evolveum.
the class ReportMainPanel method createColumnsForParameters.
private List<IColumn<PrismContainerValueWrapper<SearchFilterParameterType>, String>> createColumnsForParameters(PageAdminObjectDetails<ReportType> parentPage) {
PrismContainerWrapperModel<ReportType, SearchFilterParameterType> containerModel = PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_PARAMETER));
List<IColumn<PrismContainerValueWrapper<SearchFilterParameterType>, String>> columns = new ArrayList<>();
columns.add(new PrismPropertyWrapperColumn<SearchFilterParameterType, String>(containerModel, SearchFilterParameterType.F_NAME, AbstractItemWrapperColumn.ColumnType.VALUE, parentPage) {
@Override
public String getCssClass() {
return "col-sm-3 col-md-2";
}
});
columns.add(new PrismPropertyWrapperColumn<SearchFilterParameterType, String>(containerModel, SearchFilterParameterType.F_TYPE, AbstractItemWrapperColumn.ColumnType.VALUE, parentPage) {
@Override
public String getCssClass() {
return "col-md-3";
}
});
PrismContainerDefinition<Containerable> def = containerModel.getObject().getComplexTypeDefinition().findContainerDefinition(SearchFilterParameterType.F_DISPLAY);
columns.add(new PrismPropertyWrapperColumn(Model.of(def), DisplayType.F_LABEL, AbstractItemWrapperColumn.ColumnType.VALUE, parentPage) {
@Override
public IModel<?> getDataModel(IModel rowModel) {
return PrismPropertyWrapperModel.fromContainerValueWrapper(rowModel, ItemPath.create(SearchFilterParameterType.F_DISPLAY, DisplayType.F_LABEL));
}
});
return columns;
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn 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);
}
Aggregations