org.olat.core.gui.components.form.flexible.elements
Interface SingleSelection

All Superinterfaces:
FormBaseComponentIdProvider, FormItem, SelectionElement
All Known Implementing Classes:
SingleSelectionImpl

public interface SingleSelection
extends SelectionElement

Author:
patrickb

Field Summary
 
Fields inherited from interface org.olat.core.gui.components.form.flexible.FormItem
ERRORC, EXAMPLEC, LABELC
 
Fields inherited from interface org.olat.core.gui.components.form.flexible.FormBaseComponentIdProvider
DISPPREFIX
 
Method Summary
 int getSelected()
           
 java.lang.String getSelectedKey()
           
 boolean isOneSelected()
           
 void setKeysAndValues(java.lang.String[] keys, java.lang.String[] values, java.lang.String[] cssClasses)
          Set new keys and values in this selection box.
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.elements.SelectionElement
getKey, getSize, getValue, isMultiselect, isSelected, select
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.FormItem
addActionListener, clearError, doDispatchFormRequest, evalFormRequest, getAction, getActionListenersFor, getComponent, getErrorC, getErrorText, getExampleC, getExampleText, getLabelC, getLabelText, getName, getRootForm, getTranslator, getUserObject, hasError, hasExample, hasFocus, hasLabel, isEnabled, isMandatory, isVisible, reset, setEnabled, setErrorComponent, setErrorKey, setExampleKey, setFocus, setLabel, setLabelComponent, setMandatory, setRootForm, setTranslator, setUserObject, setVisible, showError, showExample, showLabel, validate
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.FormBaseComponentIdProvider
getFormDispatchId
 

Method Detail

getSelectedKey

java.lang.String getSelectedKey()
Returns:

isOneSelected

boolean isOneSelected()
Returns:

getSelected

int getSelected()
Returns:

setKeysAndValues

void setKeysAndValues(java.lang.String[] keys,
                      java.lang.String[] values,
                      java.lang.String[] cssClasses)
Set new keys and values in this selection box. Be aware that this does reset the selection index and other parameters.
In most cases is is better to create a new SingleSelection Element than set new keys and values for an existing SingleSelection, always check this option.

Parameters:
keys - The new keys to use
values - The new values to use
cssClasses - The CSS classes that should be used in the form element for each key-value pair or NULL not not use special styling