use of com.evolveum.midpoint.web.component.data.column.InlineMenuButtonColumn in project midpoint by Evolveum.
the class PageServices method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ServiceType> servicePanel = new MainObjectListPanel<ServiceType>(ID_TABLE, ServiceType.class, TableId.TABLE_SERVICES, null, this) {
private static final long serialVersionUID = 1L;
@Override
public void objectDetailsPerformed(AjaxRequestTarget target, ServiceType service) {
PageServices.this.serviceDetailsPerformed(target, service);
}
@Override
protected List<IColumn<SelectableBean<ServiceType>, String>> createColumns() {
return ColumnUtils.getDefaultServiceColumns();
}
@Override
protected IColumn<SelectableBean<ServiceType>, String> createActionsColumn() {
return new InlineMenuButtonColumn<SelectableBean<ServiceType>>(listInlineMenuHelper.createRowActions(false), 3, PageServices.this) {
@Override
protected int getHeaderNumberOfButtons() {
return 2;
}
@Override
protected List<InlineMenuItem> getHeaderMenuItems() {
return listInlineMenuHelper.createRowActions(true);
}
};
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
return listInlineMenuHelper.createRowActions(false);
}
@Override
protected void newObjectPerformed(AjaxRequestTarget target) {
navigateToNext(PageService.class);
}
};
servicePanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_SERVICE_BOX_CSS_CLASSES);
servicePanel.setOutputMarkupId(true);
mainForm.add(servicePanel);
}
Aggregations