use of org.olat.core.gui.components.table.TableGuiConfiguration in project openolat by klemens.
the class DENManager method createParticipantsTable.
/**
* Create the table for the participants management view
* @param ureq
* @param wControl
* @param trans
* @param listener
* @param tableData DENParticipantsTableDataModel
* @return TableController
*/
protected TableController createParticipantsTable(UserRequest ureq, WindowControl wControl, Translator trans, DENParticipantsTableDataModel tableData) {
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setTableEmptyMessage(trans.translate("dates.table.empty"));
TableController tableCntrl = new TableController(tableConfig, ureq, wControl, trans);
tableCntrl.addColumnDescriptor(new DefaultColumnDescriptor("dates.table.participant.firstname", 0, null, ureq.getLocale()));
tableCntrl.addColumnDescriptor(new DefaultColumnDescriptor("dates.table.participant.lastname", 1, null, ureq.getLocale()));
tableCntrl.addColumnDescriptor(new DefaultColumnDescriptor("dates.table.participant.email", 2, null, ureq.getLocale()));
tableCntrl.addColumnDescriptor(new BooleanColumnDescriptor("dates.table.participant.email.send", 3, DENParticipantsTableDataModel.MAIL_ACTION, trans.translate("dates.table.participant.email.send"), ""));
tableCntrl.addColumnDescriptor(new BooleanColumnDescriptor("dates.table.list.delete", 3, DENParticipantsTableDataModel.REMOVE_ACTION, trans.translate("dates.table.list.delete"), ""));
tableCntrl.setTableDataModel(tableData);
return tableCntrl;
}
use of org.olat.core.gui.components.table.TableGuiConfiguration in project openolat by klemens.
the class UsermanagerUserSearchForm method initUserListCtr.
/**
* Initialize the table controller using the list of identities
*
* @param ureq
* @param identitiesList
*/
private void initUserListCtr(UserRequest ureq, List<Identity> myIdentities, Integer searchStatusField) {
removeAsListenerAndDispose(tableCtr);
boolean actionEnabled = true;
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setTableEmptyMessage(translate("error.no.user.found"));
if ((searchStatusField != null) && (searchStatusField.equals(Identity.STATUS_DELETED))) {
actionEnabled = false;
}
tableConfig.setDownloadOffered(true);
tableConfig.setPreferencesOffered(true, "ExtendedIdentitiesTable");
tableConfig.setTableEmptyMessage(translate("error.no.user.found"));
tdm = new ExtendedIdentitiesTableDataModel(ureq, myIdentities, actionEnabled);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("table", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = addToHistory(ureq, ores, null);
tableCtr = new TableController(tableConfig, ureq, bwControl, getTranslator());
tdm.addColumnDescriptors(tableCtr, getTranslator());
tableCtr.setTableDataModel(tdm);
listenTo(tableCtr);
if (showEmailButton) {
tableCtr.addMultiSelectAction("command.mail", CMD_MAIL);
}
if (actionEnabled) {
tableCtr.addMultiSelectAction("action.bulkedit", CMD_BULKEDIT);
}
if (showEmailButton || actionEnabled) {
tableCtr.setMultiSelect(true);
}
}
use of org.olat.core.gui.components.table.TableGuiConfiguration in project openolat by klemens.
the class SelectionForm method initializeTableController.
private void initializeTableController(UserRequest ureq) {
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setTableEmptyMessage(translate("error.no.user.found"));
removeAsListenerAndDispose(tableCtr);
tableCtr = new TableController(tableConfig, ureq, getWindowControl(), propertyHandlerTranslator);
listenTo(tableCtr);
List<Identity> l = UserDeletionManager.getInstance().getDeletableIdentities(UserDeletionManager.getInstance().getLastLoginDuration());
tdm = new UserDeleteTableModel(l, ureq.getLocale(), isAdministrativeUser);
tdm.addColumnDescriptors(tableCtr, null);
tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_SINGLESELECT_CHOOSE, "table.header.action", translate("action.activate")));
tableCtr.addMultiSelectAction("action.delete.selection", ACTION_MULTISELECT_CHOOSE);
tableCtr.setMultiSelect(true);
tableCtr.setTableDataModel(tdm);
}
use of org.olat.core.gui.components.table.TableGuiConfiguration in project openolat by klemens.
the class StatusController method initializeTableController.
private void initializeTableController(UserRequest ureq) {
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setTableEmptyMessage(translate("error.no.user.found"));
removeAsListenerAndDispose(tableCtr);
tableCtr = new TableController(tableConfig, ureq, getWindowControl(), this.propertyHandlerTranslator);
listenTo(tableCtr);
List<Identity> l = UserDeletionManager.getInstance().getIdentitiesInDeletionProcess(UserDeletionManager.getInstance().getDeleteEmailDuration());
tdm = new UserDeleteTableModel(l, ureq.getLocale(), isAdministrativeUser);
tdm.addColumnDescriptors(tableCtr, null, "table.identity.deleteEmail");
tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_SINGLESELECT_CHOOSE, "table.header.action", translate("action.activate")));
tableCtr.setMultiSelect(false);
tableCtr.setTableDataModel(tdm);
userDeleteStatusPanel.setContent(tableCtr.getInitialComponent());
}
use of org.olat.core.gui.components.table.TableGuiConfiguration in project openolat by klemens.
the class GenericArchiveController method doNodeChoose.
/**
* @param ureq
*/
private void doNodeChoose(UserRequest ureq, VelocityContainer nodeChoose) {
// table configuraton
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
tableConfig.setTableEmptyMessage(translate("nodesoverview.nonodes"));
tableConfig.setDownloadOffered(false);
tableConfig.setSortingEnabled(false);
tableConfig.setDisplayTableHeader(true);
tableConfig.setDisplayRowCount(false);
tableConfig.setPageingEnabled(false);
removeAsListenerAndDispose(nodeListCtr);
nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator());
listenTo(nodeListCtr);
// table columns
nodeListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.node", 0, null, getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1, CMD_SELECT_NODE, getLocale()));
// get list of course node data and populate table data model
ICourse course = CourseFactory.loadCourse(ores);
CourseNode rootNode = course.getRunStructure().getRootNode();
List<AssessmentNodeData> nodesTableObjectArrayList = addNodesAndParentsToList(0, rootNode);
// only populate data model if data available
if (nodesTableObjectArrayList == null) {
nodeChoose.contextPut("hasNodes", Boolean.FALSE);
} else {
nodeChoose.contextPut("hasNodes", Boolean.TRUE);
nodeTableModel = new NodeTableDataModel(nodesTableObjectArrayList, getTranslator());
nodeListCtr.setTableDataModel(nodeTableModel);
nodeChoose.put("nodeTable", nodeListCtr.getInitialComponent());
}
// set main content to nodechoose, do not use wrapper
main.setContent(nodeChoose);
}
Aggregations