use of org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator in project midpoint by Evolveum.
the class PageTasks method initNodeColumns.
private List<IColumn<NodeDto, String>> initNodeColumns() {
List<IColumn<NodeDto, String>> columns = new ArrayList<>();
IColumn column = new CheckBoxHeaderColumn<>();
columns.add(column);
column = new PropertyColumn<>(createStringResource("pageTasks.node.name"), "name", "name");
columns.add(column);
columns.add(new EnumPropertyColumn<NodeDto>(createStringResource("pageTasks.node.executionStatus"), "executionStatus") {
@Override
protected String translate(Enum en) {
return createStringResource(en).getString();
}
});
columns.add(new PropertyColumn(createStringResource("pageTasks.node.managementPort"), "managementPort"));
columns.add(new AbstractColumn<NodeDto, String>(createStringResource("pageTasks.node.lastCheckInTime")) {
@Override
public void populateItem(Item<ICellPopulator<NodeDto>> item, String componentId, final IModel<NodeDto> rowModel) {
item.add(new Label(componentId, new AbstractReadOnlyModel<Object>() {
@Override
public Object getObject() {
return createLastCheckInTime(rowModel);
}
}));
}
});
CheckBoxColumn check = new CheckBoxColumn(createStringResource("pageTasks.node.clustered"), "clustered");
check.setEnabled(false);
columns.add(check);
columns.add(new PropertyColumn(createStringResource("pageTasks.node.statusMessage"), "statusMessage"));
IColumn<NodeDto, String> menuColumn = new InlineMenuButtonColumn<NodeDto>(createNodesInlineMenu(false), 2, PageTasks.this) {
@Override
protected int getHeaderNumberOfButtons() {
return 2;
}
@Override
protected List<InlineMenuItem> getHeaderMenuItems() {
return createNodesInlineMenu(true);
}
};
columns.add(menuColumn);
return columns;
}
Aggregations