use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project OpenOLAT by OpenOLAT.
the class BusinessGroupListController method initColumnModel.
@Override
protected FlexiTableColumnModel initColumnModel() {
FlexiTableColumnModel columnsModel = super.initColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.allowDelete.i18n(), Cols.allowDelete.ordinal(), TABLE_ACTION_DELETE, new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("table.header.delete"), TABLE_ACTION_DELETE), null)));
return columnsModel;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project OpenOLAT by OpenOLAT.
the class ExportOverviewController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(true, "exportable", Cols.exportable.ordinal(), false, null, FlexiColumnModel.ALIGNMENT_LEFT, new BooleanCellRenderer(new CSSIconFlexiCellRenderer("o_icon_accept"), new CSSIconFlexiCellRenderer("o_icon_failed"))));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("general.title", Cols.title.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("technical.format", Cols.format.ordinal()));
itemsModel = new QItemDataModel(columnsModel, format);
uifactory.addTableElement(getWindowControl(), "shares", itemsModel, getTranslator(), formLayout);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project OpenOLAT by OpenOLAT.
the class ImportAuthorOverviewIdentitiesController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
// add the table
FlexiTableColumnModel tableColumnModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
int colIndex = 0;
if (isAdministrativeUser) {
tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.user.login", colIndex++));
}
List<UserPropertyHandler> userPropertyHandlers = userManager.getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
List<UserPropertyHandler> resultingPropertyHandlers = new ArrayList<UserPropertyHandler>();
// followed by the users fields
for (int i = 0; i < userPropertyHandlers.size(); i++) {
UserPropertyHandler userPropertyHandler = userPropertyHandlers.get(i);
boolean visible = UserManager.getInstance().isMandatoryUserProperty(usageIdentifyer, userPropertyHandler);
if (visible) {
resultingPropertyHandlers.add(userPropertyHandler);
tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(userPropertyHandler.i18nColumnDescriptorLabelKey(), colIndex++));
}
}
Translator myTrans = userManager.getPropertyHandlerTranslator(getTranslator());
ImportAuthorOverviewDataModel userTableModel = new ImportAuthorOverviewDataModel(oks, resultingPropertyHandlers, isAdministrativeUser, getLocale(), tableColumnModel);
uifactory.addTableElement(getWindowControl(), "users", userTableModel, myTrans, formLayout);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project OpenOLAT by OpenOLAT.
the class RatingMetadataController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel ratingInfosColumnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
ratingInfosColumnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("rating.creation.date", 0));
ratingInfosColumnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("rating", 1, new RatingCellRenderer(5)));
ratingInfosModel = new RatingInfosDataModel(ratingInfosColumnsModel);
ratingInfosTable = uifactory.addTableElement(getWindowControl(), "details_ratings", ratingInfosModel, getTranslator(), formLayout);
ratingInfosTable.setCustomizeColumns(false);
ratingInfosTable.setEmtpyTableMessageKey("rating.empty.table");
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project OpenOLAT by OpenOLAT.
the class LifecycleAdminController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
// add the table
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.softkey.i18nKey(), LCCols.softkey.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.label.i18nKey(), LCCols.label.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.validFrom.i18nKey(), LCCols.validFrom.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.validTo.i18nKey(), LCCols.validTo.ordinal()));
FlexiCellRenderer delRenderer = new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("delete"), "delete-cycle"), null);
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("delete", LCCols.delete.ordinal(), "delete-cycle", delRenderer));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("edit", translate(LCCols.edit.i18nKey()), "edit-lifecycle"));
model = new LifecycleDataModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "cycles", model, getTranslator(), formLayout);
tableEl.setRendererType(FlexiTableRendererType.classic);
tableEl.setCustomizeColumns(false);
createLifeCycle = uifactory.addFormLink("create.lifecycle", formLayout, Link.BUTTON);
}
Aggregations