Search in sources :

Example 96 with FlexiTableColumnModel

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel 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)

Example 97 with FlexiTableColumnModel

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel in project openolat by klemens.

the class TaxonomyLevelTypesEditController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    addRootTypeButton = uifactory.addFormLink("add.root.type", formLayout, Link.BUTTON);
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TypesCols.identifier));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TypesCols.displayName));
    DefaultFlexiColumnModel editColumn = new DefaultFlexiColumnModel("table.header.edit", -1, "edit", new StaticFlexiCellRenderer("", "edit", "o_icon o_icon-lg o_icon_edit", translate("edit")));
    editColumn.setExportable(false);
    columnsModel.addFlexiColumnModel(editColumn);
    DefaultFlexiColumnModel toolsColumn = new DefaultFlexiColumnModel(TypesCols.tools);
    toolsColumn.setExportable(false);
    columnsModel.addFlexiColumnModel(toolsColumn);
    model = new TaxonomyLevelTypesTableModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "types", model, 25, false, getTranslator(), formLayout);
    tableEl.setEmtpyTableMessageKey("table.taxonomy.level.type.empty");
    tableEl.setAndLoadPersistedPreferences(ureq, "tax-level-types-competences");
}
Also used : StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 98 with FlexiTableColumnModel

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel in project openolat by klemens.

the class TaxonomyListAdminController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    createTaxonomyButton = uifactory.addFormLink("create.taxonomy", formLayout, Link.BUTTON);
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, TaxonomyCols.key, "select"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyCols.displayName, "select"));
    model = new TaxonomyListDataModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "table", model, 20, false, getTranslator(), formLayout);
    tableEl.setAvailableRendererTypes(FlexiTableRendererType.custom);
    tableEl.setRendererType(FlexiTableRendererType.custom);
    tableEl.setSearchEnabled(false);
    tableEl.setCustomizeColumns(false);
    tableEl.setElementCssClass("o_taxonomy_listing");
    tableEl.setEmtpyTableMessageKey("table.taxonomy.empty");
    tableEl.setNumOfRowsEnabled(false);
    tableEl.setPageSize(24);
    VelocityContainer row = createVelocityContainer("taxonomy_row");
    // sets its own DOM id in velocity container
    row.setDomReplacementWrapperRequired(false);
    tableEl.setRowRenderer(row, this);
    tableEl.setCssDelegate(new TaxonomyCssDelegate());
}
Also used : FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 99 with FlexiTableColumnModel

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel in project openolat by klemens.

the class TaxonomyTreeTableController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    newLevelButton = uifactory.addFormLink("add.taxonomy.level", formLayout, Link.BUTTON);
    deleteButton = uifactory.addFormLink("delete", formLayout, Link.BUTTON);
    mergeButton = uifactory.addFormLink("merge.taxonomy.level", formLayout, Link.BUTTON);
    typeButton = uifactory.addFormLink("type.taxonomy.level", formLayout, Link.BUTTON);
    moveButton = uifactory.addFormLink("move.taxonomy.level", formLayout, Link.BUTTON);
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, TaxonomyLevelCols.key));
    TreeNodeFlexiCellRenderer treeNodeRenderer = new TreeNodeFlexiCellRenderer();
    treeNodeRenderer.setFlatBySearchAndFilter(true);
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyLevelCols.displayName, treeNodeRenderer));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyLevelCols.identifier));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyLevelCols.typeIdentifier));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyLevelCols.numOfChildren));
    DefaultFlexiColumnModel selectColumn = new DefaultFlexiColumnModel("select", translate("select"), "select");
    selectColumn.setExportable(false);
    columnsModel.addFlexiColumnModel(selectColumn);
    DefaultFlexiColumnModel toolsColumn = new DefaultFlexiColumnModel(TaxonomyLevelCols.tools);
    toolsColumn.setExportable(false);
    columnsModel.addFlexiColumnModel(toolsColumn);
    model = new TaxonomyTreeTableModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "table", model, 20, false, getTranslator(), formLayout);
    tableEl.setSearchEnabled(true);
    tableEl.setCustomizeColumns(true);
    tableEl.setElementCssClass("o_taxonomy_level_listing");
    tableEl.setEmtpyTableMessageKey("table.taxonomy.level.empty");
    tableEl.setNumOfRowsEnabled(false);
    tableEl.setExportEnabled(true);
    tableEl.setPageSize(24);
    tableEl.setMultiSelect(true);
    tableEl.setFilters(null, getFilters(), true);
    tableEl.setRootCrumb(new TaxonomyCrumb(taxonomy.getDisplayName()));
}
Also used : TreeNodeFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TreeNodeFlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 100 with FlexiTableColumnModel

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel in project openolat by klemens.

the class VideoQualityTableFormController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(QualityTableCols.resolution));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(QualityTableCols.dimension));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(QualityTableCols.size, new TranscodingErrorIconRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(QualityTableCols.format));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(QualityTableCols.delete));
    tableModel = new VideoQualityTableModel(columnsModel, getTranslator());
    initTable();
}
Also used : FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Aggregations

FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)266 DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)254 StaticFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer)118 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)72 BooleanCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer)70 UserPropertyHandler (org.olat.user.propertyhandlers.UserPropertyHandler)70 TextFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer)60 ArrayList (java.util.ArrayList)48 FlexiTableSortOptions (org.olat.core.gui.components.form.flexible.elements.FlexiTableSortOptions)46 SortKey (org.olat.core.commons.persistence.SortKey)44 FlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiColumnModel)36 DateFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.DateFlexiCellRenderer)26 FlexiTableFilter (org.olat.core.gui.components.form.flexible.elements.FlexiTableFilter)22 FlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiCellRenderer)22 PassedCellRenderer (org.olat.course.assessment.bulk.PassedCellRenderer)20 CSSIconFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.CSSIconFlexiCellRenderer)18 ScoreCellRenderer (org.olat.modules.assessment.ui.ScoreCellRenderer)18 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)14 FlexiTableElement (org.olat.core.gui.components.form.flexible.elements.FlexiTableElement)12 Translator (org.olat.core.gui.translator.Translator)12