Search in sources :

Example 1 with MemberListTableModel

use of org.olat.group.ui.main.MemberListTableModel in project openolat by klemens.

the class MembersTableController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    SortKey defaultSortKey = initColumns(columnsModel);
    membersModel = new MemberListTableModel(columnsModel, imModule.isOnlineStatusEnabled());
    membersModel.setObjects(membersList);
    membersTable = uifactory.addTableElement(getWindowControl(), "table", membersModel, pageSize, false, getTranslator(), formLayout);
    membersTable.setEmtpyTableMessageKey("nomembers");
    membersTable.setAndLoadPersistedPreferences(ureq, this.getClass().getSimpleName());
    membersTable.setExportEnabled(false);
    membersTable.setElementCssClass("o_sel_member_list");
    if (defaultSortKey != null) {
        FlexiTableSortOptions options = new FlexiTableSortOptions();
        options.setDefaultOrderBy(defaultSortKey);
        membersTable.setSortSettings(options);
    }
}
Also used : FlexiTableSortOptions(org.olat.core.gui.components.form.flexible.elements.FlexiTableSortOptions) MemberListTableModel(org.olat.group.ui.main.MemberListTableModel) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) SortKey(org.olat.core.commons.persistence.SortKey)

Example 2 with MemberListTableModel

use of org.olat.group.ui.main.MemberListTableModel in project OpenOLAT by OpenOLAT.

the class MembersTableController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    SortKey defaultSortKey = initColumns(columnsModel);
    membersModel = new MemberListTableModel(columnsModel, imModule.isOnlineStatusEnabled());
    membersModel.setObjects(membersList);
    membersTable = uifactory.addTableElement(getWindowControl(), "table", membersModel, pageSize, false, getTranslator(), formLayout);
    membersTable.setEmtpyTableMessageKey("nomembers");
    membersTable.setAndLoadPersistedPreferences(ureq, this.getClass().getSimpleName());
    membersTable.setExportEnabled(false);
    membersTable.setElementCssClass("o_sel_member_list");
    if (defaultSortKey != null) {
        FlexiTableSortOptions options = new FlexiTableSortOptions();
        options.setDefaultOrderBy(defaultSortKey);
        membersTable.setSortSettings(options);
    }
}
Also used : FlexiTableSortOptions(org.olat.core.gui.components.form.flexible.elements.FlexiTableSortOptions) MemberListTableModel(org.olat.group.ui.main.MemberListTableModel) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) SortKey(org.olat.core.commons.persistence.SortKey)

Aggregations

SortKey (org.olat.core.commons.persistence.SortKey)2 FlexiTableSortOptions (org.olat.core.gui.components.form.flexible.elements.FlexiTableSortOptions)2 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)2 MemberListTableModel (org.olat.group.ui.main.MemberListTableModel)2