|
||||||||||
| 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.MultipleSelectionElementImpl
public class MultipleSelectionElementImpl
Description:
TODO: patrickb Class Description for MultipleSelectionElementImpl
Initial Date: 04.01.2007
| 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 | |
|---|---|
MultipleSelectionElementImpl(java.lang.String name)
|
|
MultipleSelectionElementImpl(java.lang.String name,
FormLayouter formLayout)
|
|
| Method Summary | |
|---|---|
static FormLayouter |
createHorizontalLayout(java.lang.String name)
radio buttons horizontal |
static FormLayouter |
createSelectboxLayouter(java.lang.String name)
as selectbox |
static FormLayouter |
createVerticalLayout(java.lang.String name,
int columns)
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)
|
java.util.Set<java.lang.String> |
getKeys()
Returns the keys of the checkboxes in this MultipleSelectionElement. |
java.util.Set<java.lang.String> |
getSelectedKeys()
|
int |
getSize()
|
java.lang.String |
getValue(int which)
|
boolean |
isAtLeastSelected(int howmany)
|
boolean |
isMultiselect()
selection element supports multiple select |
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 |
selectAll()
Select all selection elements. |
void |
setEnabled(boolean isEnabled)
item is enabled/disabled, e.g. |
void |
setEnabled(java.util.Set<java.lang.String> keys,
boolean isEnabled)
Enables or disables several checkboxes at once by applying MultipleSelectionElement.setEnabled(String, boolean)
to the checkboxes with the keys given in keys. |
void |
setEnabled(java.lang.String key,
boolean isEnabled)
Enables or disables a checkbox. |
void |
setKeysAndValues(java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
|
void |
setSelectedValues(java.lang.String[] values)
array of values which are selected |
void |
setVisible(boolean isVisible)
item, label, example, error get not visible |
void |
setVisible(java.util.Set<java.lang.String> keys,
boolean isEnabled)
Shows or hides several checkboxes at once by applying MultipleSelectionElement.setVisible(String, boolean)
to the checkboxes with the keys given in keys. |
void |
setVisible(java.lang.String key,
boolean isVisible)
Shows or hides a checkbox. |
void |
uncheckAll()
Uncheck all selection elements. |
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 MultipleSelectionElementImpl(java.lang.String name)
public MultipleSelectionElementImpl(java.lang.String name,
FormLayouter formLayout)
| Method Detail |
|---|
public java.util.Set<java.lang.String> getSelectedKeys()
getSelectedKeys in interface MultipleSelectionElement
public void setKeysAndValues(java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
setKeysAndValues in interface MultipleSelectionElementcssClasses - The CSS classes that should be used in the form element for
each key-value pair or NULL not not use special stylingpublic boolean isAtLeastSelected(int howmany)
isAtLeastSelected in interface MultipleSelectionElementorg.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement#isAtLeastSelected(int,
java.lang.String)public java.lang.String getKey(int which)
getKey in interface SelectionElementpublic int getSize()
getSize in interface SelectionElementpublic java.lang.String getValue(int which)
getValue in interface SelectionElementpublic boolean isMultiselect()
isMultiselect in interface SelectionElementSelectionElement.isMultiselect()public boolean isSelected(int which)
isSelected in interface SelectionElement
public void select(java.lang.String key,
boolean select)
select in interface SelectionElementpublic void setSelectedValues(java.lang.String[] values)
values - 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 setEnabled(java.lang.String key,
boolean isEnabled)
MultipleSelectionElementorg.olat.core.gui.components.form.flexible.FormItem#setesetEnabled(boolean) which enables or disables
all checkboxes of this form element.
setEnabled in interface MultipleSelectionElementkey - The key of the checkbox.isEnabled - true means enabled.MultipleSelectionElement.setEnabled(java.lang.String, boolean)
public void setEnabled(java.util.Set<java.lang.String> keys,
boolean isEnabled)
MultipleSelectionElementMultipleSelectionElement.setEnabled(String, boolean)
to the checkboxes with the keys given in keys.
setEnabled in interface MultipleSelectionElementkeys - Keys of the checkboxes.isEnabled - Whether the checkboxes given in keys are to be enabled (true) or disabled (false).MultipleSelectionElement.setEnabled(java.util.Set, boolean)public void setVisible(boolean isVisible)
FormItem
setVisible in interface FormItemsetVisible in class FormItemImpl
public void setVisible(java.lang.String key,
boolean isVisible)
MultipleSelectionElementFormItem.setVisible(boolean) which shows or hides
all checkboxes of this form element.
setVisible in interface MultipleSelectionElementkey - The key of the checkbox.MultipleSelectionElement.setVisible(java.lang.String, boolean)
public void setVisible(java.util.Set<java.lang.String> keys,
boolean isEnabled)
MultipleSelectionElementMultipleSelectionElement.setVisible(String, boolean)
to the checkboxes with the keys given in keys.
setVisible in interface MultipleSelectionElementkeys - Keys of the checkboxes.isEnabled - Whether the checkboxes given in keys are to be shown (true) or hidden (false).MultipleSelectionElement.setVisible(java.util.Set, boolean)public java.util.Set<java.lang.String> getKeys()
MultipleSelectionElement.
public 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 FormLayouter createSelectboxLayouter(java.lang.String name)
name -
public static FormLayouter createHorizontalLayout(java.lang.String name)
name -
public static FormLayouter createVerticalLayout(java.lang.String name,
int columns)
name -
public void selectAll()
selectAll in interface MultipleSelectionElementpublic void uncheckAll()
uncheckAll in interface MultipleSelectionElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||