Search in sources :

Example 6 with MultipleSelectionElementImpl

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

the class FormUIFactory method addCheckboxesDropdown.

public MultipleSelectionElement addCheckboxesDropdown(String name, String i18nLabel, FormItemContainer formLayout, String[] keys, String[] values, String[] cssClasses, String[] iconLeftCSS) {
    MultipleSelectionElement mse = new MultipleSelectionElementImpl(name, Layout.dropdown);
    mse.setKeysAndValues(keys, values, cssClasses, iconLeftCSS);
    setLabelIfNotNull(i18nLabel, mse);
    formLayout.add(mse);
    return mse;
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) MultipleSelectionElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)

Example 7 with MultipleSelectionElementImpl

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

the class FormUIFactory method addCheckboxesHorizontal.

/**
 * Create a multiple selection element with check-boxes horizontal aligned.
 *
 * @param name
 * @param i18nLabel
 * @param formLayout
 * @param keys
 * @param values
 * @return
 */
public MultipleSelectionElement addCheckboxesHorizontal(String name, String i18nLabel, FormItemContainer formLayout, String[] keys, String[] values) {
    MultipleSelectionElement mse = new MultipleSelectionElementImpl(name);
    mse.setKeysAndValues(keys, values);
    setLabelIfNotNull(i18nLabel, mse);
    formLayout.add(mse);
    return mse;
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) MultipleSelectionElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)

Example 8 with MultipleSelectionElementImpl

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

the class FormUIFactory method addCheckboxesVertical.

/**
 * Create a multiple selection element with check-boxes that is rendered in vertical columns
 * @param name
 * @param i18nLabel
 * @param formLayout
 * @param keys
 * @param values
 * @param cssClasses
 * @param columns
 * @return
 */
public MultipleSelectionElement addCheckboxesVertical(String name, String i18nLabel, FormItemContainer formLayout, String[] keys, String[] values, String[] cssClasses, String[] iconLeftCSS, int columns) {
    MultipleSelectionElement mse = new MultipleSelectionElementImpl(name, Layout.vertical, columns);
    mse.setKeysAndValues(keys, values, cssClasses, iconLeftCSS);
    setLabelIfNotNull(i18nLabel, mse);
    formLayout.add(mse);
    return mse;
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) MultipleSelectionElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)

Example 9 with MultipleSelectionElementImpl

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

the class EditMembershipController method createSelection.

private MultipleSelectionElement createSelection(boolean selected, boolean enabled, String role) {
    String name = "cb" + UUID.randomUUID().toString().replace("-", "");
    MultipleSelectionElement selection = new MultipleSelectionElementImpl(name, Layout.horizontal);
    selection.setElementCssClass("o_sel_role");
    selection.addActionListener(FormEvent.ONCHANGE);
    selection.setKeysAndValues(keys, values, new String[] { "o_sel_role_".concat(role) }, null);
    flc.add(name, selection);
    selection.select(keys[0], selected);
    selection.setEnabled(enabled);
    return selection;
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) MultipleSelectionElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)

Example 10 with MultipleSelectionElementImpl

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

the class GroupSearchController method createSelection.

private MultipleSelectionElement createSelection(String name) {
    MultipleSelectionElement selection = new MultipleSelectionElementImpl(name, Layout.horizontal);
    selection.setKeysAndValues(new String[] { "on" }, new String[] { "" });
    tableCont.add(name, selection);
    return selection;
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) MultipleSelectionElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)

Aggregations

MultipleSelectionElement (org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement)16 MultipleSelectionElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.MultipleSelectionElementImpl)16 HashSet (java.util.HashSet)6 Vector (java.util.Vector)2 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)2