tableConfig.setTableEmptyMessage(translate("projectlist.no.projects"));
tableConfig.setPreferencesOffered(true, "projectbrokerList");
tableConfig.setShowAllLinkEnabled(false);// Do not allow show all because many entries takes too long to render
TableController tableController = new TableController(tableConfig, ureq, wControl, this.getTranslator(), this, true);
int dataColumn = 0;
tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.title", dataColumn++, TABLE_ACTION_SHOW_DETAIL, ureq.getLocale()));
DefaultColumnDescriptor projectManagerDescriptor = new DefaultColumnDescriptor("projectlist.tableheader.account.manager", dataColumn++, TABLE_ACTION_ACCOUNT_MANAGER, ureq.getLocale());
projectManagerDescriptor.setIsPopUpWindowAction( true, "height=600, width=900, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
tableController.addColumnDescriptor(projectManagerDescriptor);
// Custom-Fields
List<CustomField> customFieldList = moduleConfig.getCustomFields();
for (Iterator iterator = customFieldList.iterator(); iterator.hasNext();) {
CustomField customField = (CustomField) iterator.next();
if (customField.isTableViewEnabled()) {
numberOfCustomFieldInTable++;
DefaultColumnDescriptor columnDescriptor = new DefaultColumnDescriptor(customField.getName(), dataColumn++,null, ureq.getLocale());
columnDescriptor.setTranslateHeaderKey(false);
tableController.addColumnDescriptor(columnDescriptor);
}
}
// Project Events
for (Project.EventType eventType : Project.EventType.values()) {
if (moduleConfig.isProjectEventEnabled(eventType) && moduleConfig.isProjectEventTableViewEnabled(eventType)) {
numberOfEventInTable ++;
tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.event." + eventType.getI18nKey(), dataColumn++,null, ureq.getLocale()));
}
}
tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.state", dataColumn++,null, ureq.getLocale()));
tableController.addColumnDescriptor(new DefaultColumnDescriptor("projectlist.tableheader.numbers", dataColumn++, null, ureq.getLocale()));
tableController.addColumnDescriptor(new BooleanColumnDescriptor("projectlist.tableheader.select", dataColumn++, TABLE_ACTION_SELECT,
translate("table.action.select"), "-" ));
tableController.addColumnDescriptor(new BooleanColumnDescriptor("projectlist.tableheader.cancel.select", dataColumn++, TABLE_ACTION_CANCEL_SELECT,
translate("projectlist.tableheader.cancel.select"), "-" ));