Search in sources :

Example 6 with RepositoryTableModel

use of org.olat.repository.ui.RepositoryTableModel in project openolat by klemens.

the class BGConfigResourcesStepController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    addResource = uifactory.addFormLink("cmd.addresource", formLayout, Link.BUTTON);
    Translator resourceTrans = Util.createPackageTranslator(RepositoryTableModel.class, getLocale(), getTranslator());
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setTableEmptyMessage(translate("config.resources.noresources"));
    resourcesCtr = new TableController(tableConfig, ureq, getWindowControl(), resourceTrans);
    listenTo(resourcesCtr);
    repoTableModel = new RepositoryTableModel(getLocale());
    repoTableModel.addColumnDescriptors(resourcesCtr, false, false, true, true);
    resourcesCtr.setTableDataModel(repoTableModel);
    ((FormLayoutContainer) formLayout).put("resources", resourcesCtr.getInitialComponent());
}
Also used : RepositoryTableModel(org.olat.repository.ui.RepositoryTableModel) Translator(org.olat.core.gui.translator.Translator) TableController(org.olat.core.gui.components.table.TableController) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) TableGuiConfiguration(org.olat.core.gui.components.table.TableGuiConfiguration)

Aggregations

RepositoryTableModel (org.olat.repository.ui.RepositoryTableModel)6 TableController (org.olat.core.gui.components.table.TableController)4 TableGuiConfiguration (org.olat.core.gui.components.table.TableGuiConfiguration)4 RepositoryEntry (org.olat.repository.RepositoryEntry)4 Component (org.olat.core.gui.components.Component)2 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)2 TableEvent (org.olat.core.gui.components.table.TableEvent)2 GenericTreeModel (org.olat.core.gui.components.tree.GenericTreeModel)2 TreeModel (org.olat.core.gui.components.tree.TreeModel)2 Translator (org.olat.core.gui.translator.Translator)2 AssertException (org.olat.core.logging.AssertException)2 BusinessGroupMembership (org.olat.group.BusinessGroupMembership)2 OLATResource (org.olat.resource.OLATResource)2