Search in sources :

Example 6 with FlexiTableElementImpl

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

the class FormUIFactory method addDownloadLink.

public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, File file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 7 with FlexiTableElementImpl

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

the class FormUIFactory method addTableElement.

/**
 * @param wControl
 * @param name
 * @param tableModel
 * @param translator
 * @param formLayout
 * @return
 */
public FlexiTableElement addTableElement(WindowControl wControl, String name, FlexiTableDataModel<?> tableModel, Translator translator, FormItemContainer formLayout) {
    FlexiTableElementImpl fte = new FlexiTableElementImpl(wControl, name, translator, tableModel);
    formLayout.add(fte);
    return fte;
}
Also used : FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 8 with FlexiTableElementImpl

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

the class FormUIFactory method addTableElement.

public FlexiTableElement addTableElement(WindowControl wControl, String name, FlexiTableDataModel<?> tableModel, int pageSize, boolean loadOnInit, Translator translator, FormItemContainer formLayout) {
    FlexiTableElementImpl fte = new FlexiTableElementImpl(wControl, name, translator, tableModel, pageSize, loadOnInit);
    formLayout.add(fte);
    return fte;
}
Also used : FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 9 with FlexiTableElementImpl

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

the class FormUIFactory method addDownloadLink.

/**
 * Add a download link
 * @param name
 * @param linkTitle
 * @param i18nLabel
 * @param file
 * @param formLayout
 * @return
 */
public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, VFSLeaf file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 10 with FlexiTableElementImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl in project OpenOLAT by OpenOLAT.

the class FormUIFactory method addDownloadLink.

public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, File file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Aggregations

FlexiTableElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)12 DownloadLinkImpl (org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl)4 Form (org.olat.core.gui.components.form.flexible.impl.Form)2 NameValuePair (org.olat.core.gui.components.form.flexible.impl.NameValuePair)2 AssessedBinderSection (org.olat.modules.portfolio.model.AssessedBinderSection)2 SharedItemRow (org.olat.modules.portfolio.model.SharedItemRow)2 SharedPageRow (org.olat.modules.portfolio.ui.shared.SharedPageRow)2