Search in sources :

Example 1 with TaxonomyLevelRelationTypeRenderer

use of org.olat.modules.taxonomy.ui.component.TaxonomyLevelRelationTypeRenderer in project OpenOLAT by OpenOLAT.

the class TaxonomyLevelRelationsController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.key));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.type, new TaxonomyLevelRelationTypeRenderer(getTranslator())));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.displayName));
    tableModel = new TaxonomyLevelRelationsTableModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, 20, false, getTranslator(), formLayout);
    tableEl.setCustomizeColumns(true);
    tableEl.setEmtpyTableMessageKey("table.relations.empty");
    tableEl.setAndLoadPersistedPreferences(ureq, "tax-level-relations");
}
Also used : FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TaxonomyLevelRelationTypeRenderer(org.olat.modules.taxonomy.ui.component.TaxonomyLevelRelationTypeRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 2 with TaxonomyLevelRelationTypeRenderer

use of org.olat.modules.taxonomy.ui.component.TaxonomyLevelRelationTypeRenderer in project openolat by klemens.

the class TaxonomyLevelRelationsController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.key));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.type, new TaxonomyLevelRelationTypeRenderer(getTranslator())));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.displayName));
    tableModel = new TaxonomyLevelRelationsTableModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, 20, false, getTranslator(), formLayout);
    tableEl.setCustomizeColumns(true);
    tableEl.setEmtpyTableMessageKey("table.relations.empty");
    tableEl.setAndLoadPersistedPreferences(ureq, "tax-level-relations");
}
Also used : FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TaxonomyLevelRelationTypeRenderer(org.olat.modules.taxonomy.ui.component.TaxonomyLevelRelationTypeRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Aggregations

DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)2 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)2 TaxonomyLevelRelationTypeRenderer (org.olat.modules.taxonomy.ui.component.TaxonomyLevelRelationTypeRenderer)2