|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.components.form.flexible.impl.FormItemImpl
org.olat.core.gui.components.form.flexible.impl.elements.SingleSelectionImpl
public class SingleSelectionImpl
Description:
TODO: patrickb Class Description for SingleSelectionContainerImpl
Initial Date: 27.12.2006
| 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 |
| Constructor Summary | |
|---|---|
SingleSelectionImpl(java.lang.String name)
|
|
SingleSelectionImpl(java.lang.String name,
FormLayouter formLayout)
set your layout |
|
| Method Summary | |
|---|---|
static FormLayoutContainer |
createHorizontalLayout(java.lang.String name)
radio buttons horizontal |
static FormLayoutContainer |
createSelectboxLayouter(java.lang.String name)
as selectbox |
static FormLayoutContainer |
createVerticalLayout(java.lang.String name)
radio buttons vertical |
void |
evalFormRequest(UserRequest ureq)
gets called if the implementing component is part of a form which gets partly submitted -> extract data for you and store it temporarly for redisplay without a validation |
java.lang.String |
getFormDispatchId()
A String containing a unique ID per form element component on the screen. |
java.lang.String |
getKey(int which)
|
int |
getSelected()
|
java.lang.String |
getSelectedKey()
|
int |
getSize()
|
java.lang.String |
getValue(int which)
|
boolean |
isMultiselect()
we are single selection, hence return always false here |
boolean |
isOneSelected()
|
boolean |
isSelected(int which)
|
void |
reset()
reset the data in the field to a initial/predefined value. |
void |
select(java.lang.String key,
boolean select)
|
void |
setEnabled(boolean isEnabled)
item is enabled/disabled, e.g. |
void |
setKeysAndValues(java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
Set new keys and values in this selection box. |
void |
setVisible(boolean isVisible)
item, label, example, error get not visible |
void |
validate(java.util.List validationResults)
validate the data in the field, create error messages or update any component. |
| Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormItemImpl |
|---|
addActionListener, clearError, doDispatchFormRequest, getAction, getActionListenersFor, getComponent, getEmptyDisplayText, getErrorC, getErrorText, getExampleC, getExampleText, getLabelC, getLabelText, getName, getRootForm, getTranslator, getUserObject, hasError, hasExample, hasFocus, hasLabel, isEnabled, isInlineEditingOn, isMandatory, isVisible, setEmptyDisplayText, setErrorComponent, setErrorKey, setExampleKey, setFocus, setLabel, setLabelComponent, setMandatory, setRootForm, setTranslator, setUserObject, showError, showExample, showLabel, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.olat.core.gui.components.form.flexible.FormItem |
|---|
addActionListener, clearError, doDispatchFormRequest, getAction, getActionListenersFor, getComponent, getErrorC, getErrorText, getExampleC, getExampleText, getLabelC, getLabelText, getName, getRootForm, getTranslator, getUserObject, hasError, hasExample, hasFocus, hasLabel, isEnabled, isMandatory, isVisible, setErrorComponent, setErrorKey, setExampleKey, setFocus, setLabel, setLabelComponent, setMandatory, setRootForm, setTranslator, setUserObject, showError, showExample, showLabel |
| Constructor Detail |
|---|
public SingleSelectionImpl(java.lang.String name)
name -
public SingleSelectionImpl(java.lang.String name,
FormLayouter formLayout)
name - presentation - | Method Detail |
|---|
public int getSelected()
getSelected in interface SingleSelectionorg.olat.core.gui.components.form.flexible.elements.SingleSelectionContainer#getSelected()public java.lang.String getSelectedKey()
getSelectedKey in interface SingleSelectionorg.olat.core.gui.components.form.flexible.elements.SingleSelectionContainer#getSelectedKey()public boolean isOneSelected()
isOneSelected in interface SingleSelectionorg.olat.core.gui.components.form.flexible.elements.SingleSelectionContainer#isOneSelected()
public void setKeysAndValues(java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
SingleSelection
setKeysAndValues in interface SingleSelectionkeys - The new keys to usevalues - The new values to usecssClasses - The CSS classes that should be used in the form element for
each key-value pair or NULL not not use special stylingSingleSelection.setKeysAndValues(String[], String[], String[])public java.lang.String getKey(int which)
getKey in interface SelectionElementorg.olat.core.gui.components.form.flexible.elements.SelectionContainer#getKey(int)public int getSize()
getSize in interface SelectionElementorg.olat.core.gui.components.form.flexible.elements.SelectionContainer#getSize()public java.lang.String getValue(int which)
getValue in interface SelectionElementorg.olat.core.gui.components.form.flexible.elements.SelectionContainer#getValue(int)public boolean isSelected(int which)
isSelected in interface SelectionElementorg.olat.core.gui.components.form.flexible.elements.SelectionContainer#isSelected(int)
public void select(java.lang.String key,
boolean select)
select in interface SelectionElementSelectionElement.select(java.lang.String, boolean)public boolean isMultiselect()
isMultiselect in interface SelectionElementSelectionElement.isMultiselect()public void evalFormRequest(UserRequest ureq)
FormItemImpl
evalFormRequest in interface FormItemevalFormRequest in class FormItemImplpublic void validate(java.util.List validationResults)
FormItemThis method must be implemented by a specialised form item provider.
validate in interface FormItemvalidate in class FormItemImplorg.olat.core.gui.components.form.flexible.FormComponent#validate(java.util.List)public void reset()
FormItem
reset in interface FormItemreset in class FormItemImplFormItem.reset()public void setEnabled(boolean isEnabled)
FormItem
setEnabled in interface FormItemsetEnabled in class FormItemImplorg.olat.core.gui.components.form.flexible.FormItemImpl#setEnabled(boolean)public void setVisible(boolean isVisible)
FormItem
setVisible in interface FormItemsetVisible in class FormItemImplpublic java.lang.String getFormDispatchId()
FormBaseComponentIdProviderComponent#getDispatchID() and should
achieve the same for the form elements.
getFormDispatchId in interface FormBaseComponentIdProvidergetFormDispatchId in class FormItemImplFormBaseComponentIdProvider.getFormDispatchId()public static FormLayoutContainer createSelectboxLayouter(java.lang.String name)
name -
public static FormLayoutContainer createHorizontalLayout(java.lang.String name)
name -
public static FormLayoutContainer createVerticalLayout(java.lang.String name)
name -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||