Search in sources :

Example 1 with SelectboxSelectionImpl

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

the class FormUIFactory method addDropdownSingleselect.

/**
 * Add a drop down menu (also called pulldown menu).
 * @param id The unique identifier of the selection box (can be null, will be auto generated)
 * @param name
 * @param labelKey i18n key for the label, may be <code>null</code> indicating no label.
 * @param formLayout
 * @param theKeys
 * @param theValues
 * @param theCssClasses
 * @return
 */
public SingleSelection addDropdownSingleselect(final String id, final String name, final String i18nLabel, FormItemContainer formLayout, final String[] theKeys, final String[] theValues, final String[] theCssClasses) {
    SingleSelection ss = new SelectboxSelectionImpl(id, name, formLayout.getTranslator().getLocale());
    ss.setKeysAndValues(theKeys, theValues, theCssClasses);
    setLabelIfNotNull(i18nLabel, ss);
    formLayout.add(ss);
    return ss;
}
Also used : SingleSelection(org.olat.core.gui.components.form.flexible.elements.SingleSelection) SelectboxSelectionImpl(org.olat.core.gui.components.form.flexible.impl.elements.SelectboxSelectionImpl)

Example 2 with SelectboxSelectionImpl

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

the class FormUIFactory method addDropdownSingleselect.

/**
 * Add a drop down menu (also called pulldown menu).
 * @param id The unique identifier of the selection box (can be null, will be auto generated)
 * @param name
 * @param labelKey i18n key for the label, may be <code>null</code> indicating no label.
 * @param formLayout
 * @param theKeys
 * @param theValues
 * @param theCssClasses
 * @return
 */
public SingleSelection addDropdownSingleselect(final String id, final String name, final String i18nLabel, FormItemContainer formLayout, final String[] theKeys, final String[] theValues, final String[] theCssClasses) {
    SingleSelection ss = new SelectboxSelectionImpl(id, name, formLayout.getTranslator().getLocale());
    ss.setKeysAndValues(theKeys, theValues, theCssClasses);
    setLabelIfNotNull(i18nLabel, ss);
    formLayout.add(ss);
    return ss;
}
Also used : SingleSelection(org.olat.core.gui.components.form.flexible.elements.SingleSelection) SelectboxSelectionImpl(org.olat.core.gui.components.form.flexible.impl.elements.SelectboxSelectionImpl)

Aggregations

SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)2 SelectboxSelectionImpl (org.olat.core.gui.components.form.flexible.impl.elements.SelectboxSelectionImpl)2