use of org.apache.wicket.extensions.markup.html.repeater.data.table.export.AbstractExportableColumn in project midpoint by Evolveum.
the class AbstractRoleMemberPanel method createMembersColumns.
protected List<IColumn<SelectableBean<ObjectType>, String>> createMembersColumns() {
List<IColumn<SelectableBean<ObjectType>, String>> columns = new ArrayList<>();
IColumn<SelectableBean<ObjectType>, String> column = new AbstractExportableColumn<SelectableBean<ObjectType>, String>(createStringResource("TreeTablePanel.fullName.displayName")) {
private static final long serialVersionUID = 1L;
@Override
public void populateItem(Item<ICellPopulator<SelectableBean<ObjectType>>> cellItem, String componentId, IModel<SelectableBean<ObjectType>> rowModel) {
SelectableBean<ObjectType> bean = rowModel.getObject();
ObjectType object = bean.getValue();
cellItem.add(new Label(componentId, getMemberObjectDisplayName(object)));
}
@Override
public IModel<String> getDataModel(IModel<SelectableBean<ObjectType>> rowModel) {
return Model.of(getMemberObjectDisplayName(rowModel.getObject().getValue()));
}
};
columns.add(column);
column = new AbstractExportableColumn<SelectableBean<ObjectType>, String>(createStringResource("TreeTablePanel.identifier.description")) {
private static final long serialVersionUID = 1L;
@Override
public void populateItem(Item<ICellPopulator<SelectableBean<ObjectType>>> cellItem, String componentId, IModel<SelectableBean<ObjectType>> rowModel) {
SelectableBean<ObjectType> bean = rowModel.getObject();
ObjectType object = bean.getValue();
cellItem.add(new Label(componentId, getMemberObjectIdentifier(object)));
}
@Override
public IModel<String> getDataModel(IModel<SelectableBean<ObjectType>> rowModel) {
return Model.of(getMemberObjectIdentifier(rowModel.getObject().getValue()));
}
};
columns.add(column);
return columns;
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.export.AbstractExportableColumn in project midpoint by Evolveum.
the class RoleGovernanceRelationsPanel method createMembersColumns.
@Override
protected List<IColumn<SelectableBean<ObjectType>, String>> createMembersColumns() {
List<IColumn<SelectableBean<ObjectType>, String>> columns = super.createMembersColumns();
IColumn<SelectableBean<ObjectType>, String> column = new AbstractExportableColumn<SelectableBean<ObjectType>, String>(createStringResource("roleMemberPanel.relation")) {
private static final long serialVersionUID = 1L;
@Override
public void populateItem(Item<ICellPopulator<SelectableBean<ObjectType>>> cellItem, String componentId, IModel<SelectableBean<ObjectType>> rowModel) {
cellItem.add(new Label(componentId, getRelationValue((FocusType) rowModel.getObject().getValue())));
}
@Override
public IModel<String> getDataModel(IModel<SelectableBean<ObjectType>> rowModel) {
return Model.of(getRelationValue((FocusType) rowModel.getObject().getValue()));
}
};
columns.add(column);
return columns;
}
Aggregations