if ("token".equalsIgnoreCase(name)) {
columns.add(new TokenColumn("token"));
} else if (field != null && field.getType().equals(Date.class)) {
columns.add(new DatePropertyColumn<UserTO>(new ResourceModel(name, name), name, name));
} else {
columns.add(new PropertyColumn(new ResourceModel(name, name), name, name));
}
}
for (String name : preferences.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW)) {
columns.add(new UserAttrColumn(name, UserAttrColumn.SchemaType.schema));
}
for (String name : preferences.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW)) {
columns.add(new UserAttrColumn(name, UserAttrColumn.SchemaType.derivedSchema));
}
for (String name : preferences.getList(getRequest(), Constants.PREF_USERS_VIRTUAL_ATTRIBUTES_VIEW)) {
columns.add(new UserAttrColumn(name, UserAttrColumn.SchemaType.virtualSchema));
}
// Add defaults in case of empty selections
if (columns.isEmpty()) {
columns.add(new PropertyColumn(new ResourceModel("id", "id"), "id", "id"));
columns.add(new PropertyColumn(new ResourceModel("username", "username"), "username", "username"));
columns.add(new PropertyColumn(new ResourceModel("status", "status"), "status", "status"));
}
columns.add(new AbstractColumn<UserTO>(new ResourceModel("actions", "")) {
private static final long serialVersionUID = 2054811145491901166L;