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");
}
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");
}
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());
}
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()));
}
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();
}
Aggregations