|
||||||||||
| 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
public abstract class FormItemImpl
Initial Date: 22.11.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 | |
|---|---|
FormItemImpl(java.lang.String name)
|
|
FormItemImpl(java.lang.String name,
boolean asInlineEditingElement)
|
|
| Method Summary | |
|---|---|
void |
addActionListener(Controller listener,
int action)
|
void |
clearError()
error is resolved, e.g. |
void |
doDispatchFormRequest(UserRequest ureq)
gets called if the implementing component was clicked. |
abstract 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 |
int |
getAction()
|
java.util.List |
getActionListenersFor(int event)
|
Component |
getComponent()
The elements panel to be rendered by the GUI Framework. |
java.lang.String |
getEmptyDisplayText()
|
Component |
getErrorC()
a complex "error" message, or a helper wizard to fix the error may be |
java.lang.String |
getErrorText()
This method is used by a form infrastructure provider. |
Component |
getExampleC()
translated example text, wrapped in component |
java.lang.String |
getExampleText()
This method is used by a form infrastructure provider. |
java.lang.String |
getFormDispatchId()
A String containing a unique ID per form element component on the screen. |
Component |
getLabelC()
label panel of the form item, null if no label
provided/rendered |
java.lang.String |
getLabelText()
label panel of the form item, null if no label
provided/rendered |
java.lang.String |
getName()
The form item's name within an manageing form container. |
Form |
getRootForm()
a form item always has a root container where it belongs to. |
Translator |
getTranslator()
|
java.lang.Object |
getUserObject()
|
boolean |
hasError()
|
boolean |
hasExample()
|
boolean |
hasFocus()
true if this element tries to get focus. |
boolean |
hasLabel()
|
boolean |
isEnabled()
true if item is marked as editable. |
boolean |
isInlineEditingOn()
|
boolean |
isMandatory()
true if the form item should contain a (valid) value. |
boolean |
isVisible()
true if form item was marked visible. |
abstract void |
reset()
reset the data in the field to a initial/predefined value. |
FormItem |
setEmptyDisplayText(java.lang.String i18nKey4Text)
|
void |
setEnabled(boolean isEnabled)
item is enabled/disabled, e.g. |
void |
setErrorComponent(FormItem errorFormItem,
FormLayouter container)
a complex "error" message, or a helper wizard to fix the error. It must be a form item itself, that starting the fixing workflow let the surrounding form evaluate (intermediate save values). Typically a FormLink is used here to start a workflow in a modal
dialog.Use showError(true) for the visibility of the error. |
void |
setErrorKey(java.lang.String errorKey,
java.lang.String[] params)
Sets the i18n key for this form item's error message and displays the error message if showErro(true) is set. |
void |
setExampleKey(java.lang.String exampleKey,
java.lang.String[] params)
key for example with params to fill |
void |
setFocus(boolean hasFocus)
true if the element should (try to) get focus, false is default |
void |
setLabel(java.lang.String label,
java.lang.String[] params)
Key to be translated with the form translator and placed in the label panel. |
FormItem |
setLabelComponent(FormItem labelComponent,
FormItemContainer container)
see setErrorComponent for comments |
void |
setMandatory(boolean isMandatory)
Shows a mandatory icon next to this form item. |
void |
setRootForm(Form rootForm)
|
void |
setTranslator(Translator translator)
|
void |
setUserObject(java.lang.Object userObject)
|
void |
setVisible(boolean isVisible)
item, label, example, error get not visible |
void |
showError(boolean show)
|
void |
showExample(boolean show)
|
void |
showLabel(boolean show)
|
java.lang.String |
toString()
|
abstract void |
validate(java.util.List validationResults)
validate the data in the field, create error messages or update any component. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormItemImpl(java.lang.String name)
name -
public FormItemImpl(java.lang.String name,
boolean asInlineEditingElement)
| Method Detail |
|---|
public java.lang.String getName()
FormItemFormItemImpl uses the name to make the
element available in the velocity container.
This method is used by a form infrastructure provider.
getName in interface FormItempublic boolean isInlineEditingOn()
isInlineEditingOn in interface InlineElementpublic FormItem setEmptyDisplayText(java.lang.String i18nKey4Text)
setEmptyDisplayText in interface InlineElementpublic java.lang.String getEmptyDisplayText()
getEmptyDisplayText in interface InlineElementpublic Component getComponent()
FormItem
getComponent in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getAsComponent()public Form getRootForm()
FormItemThis method must be implemented by a specialised form item provider.
getRootForm in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getRootForm()public void setRootForm(Form rootForm)
setRootForm in interface FormItempublic void setTranslator(Translator translator)
setTranslator in interface FormItempublic Translator getTranslator()
getTranslator in interface FormItempublic Component getLabelC()
FormItemnull if no label
provided/rendered
This method is used by a form infrastructure provider.
getLabelC in interface FormItempublic java.lang.String getLabelText()
FormItemnull if no label
provided/rendered
This method is used by a form infrastructure provider.
getLabelText in interface FormItem
public void setLabel(java.lang.String label,
java.lang.String[] params)
FormItem
setLabel in interface FormItemlabel - i18n keyparams - i18n key parameters
public FormItem setLabelComponent(FormItem labelComponent,
FormItemContainer container)
FormItem
setLabelComponent in interface FormItemlabelComponent - container -
public void setFocus(boolean hasFocus)
FormItem
setFocus in interface FormItempublic boolean isMandatory()
FormItem
isMandatory in interface FormItempublic boolean hasFocus()
FormItem
hasFocus in interface FormItempublic void setMandatory(boolean isMandatory)
FormItem
setMandatory in interface FormItemisMandatory - Whether this form item should have a mandatory icon.public Component getExampleC()
FormItemThis method is used by a form infrastructure provider.
getExampleC in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getExample()public java.lang.String getExampleText()
FormItemThis method is used by a form infrastructure provider.
getExampleText in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getExampleText()
public void setExampleKey(java.lang.String exampleKey,
java.lang.String[] params)
FormItem
setExampleKey in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#setExampleKey(java.lang.String,
java.lang.String[])
public void setErrorKey(java.lang.String errorKey,
java.lang.String[] params)
FormItem
setErrorKey in interface FormItemerrorKey - i18n key for the error message.params - Additional error message contents.org.olat.core.gui.components.form.flexible.FormComponent#setErrorKey(java.lang.String,
java.lang.String[])
public void setErrorComponent(FormItem errorFormItem,
FormLayouter container)
FormItemFormLink is used here to start a workflow in a modal
dialog.
setErrorComponent in interface FormItemcontainer - the container containing the form item which has the errororg.olat.core.gui.components.form.flexible.FormComponent#setErrorController(org.olat.core.gui.control.Controller)public Component getErrorC()
FormItem
This method is used by a form infrastructure provider. null
getErrorC in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getErrorController()public java.lang.String getErrorText()
FormItemThis method is used by a form infrastructure provider.
getErrorText in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#getErrorText()public void setEnabled(boolean isEnabled)
FormItem
setEnabled in interface FormItempublic boolean isEnabled()
FormItem
isEnabled in interface FormItempublic void setVisible(boolean isVisible)
FormItem
setVisible in interface FormItempublic boolean isVisible()
FormItem
isVisible in interface FormItempublic boolean hasError()
hasError in interface FormItempublic boolean hasLabel()
hasLabel in interface FormItempublic boolean hasExample()
hasExample in interface FormItempublic void showLabel(boolean show)
showLabel in interface FormItempublic void showError(boolean show)
showError in interface FormItempublic void clearError()
FormItem
clearError in interface FormItempublic void showExample(boolean show)
showExample in interface FormItem
public void addActionListener(Controller listener,
int action)
addActionListener in interface FormItemorg.olat.core.gui.components.form.flexible.FormItem#addActionListenerFor(org.olat.core.gui.control.Controller, int)public java.util.List getActionListenersFor(int event)
getActionListenersFor in interface FormItempublic int getAction()
getAction in interface FormItempublic abstract void evalFormRequest(UserRequest ureq)
evalFormRequest in interface FormItemureq - public void doDispatchFormRequest(UserRequest ureq)
doDispatchFormRequest in interface FormItemureq - formId - public java.lang.Object getUserObject()
getUserObject in interface FormItemorg.olat.core.gui.components.form.flexible.api.FormItem#getUserObject()public void setUserObject(java.lang.Object userObject)
setUserObject in interface FormItemorg.olat.core.gui.components.form.flexible.api.FormItem#setUserObject(java.lang.Object)public java.lang.String getFormDispatchId()
FormBaseComponentIdProviderComponent#getDispatchID() and should
achieve the same for the form elements.
getFormDispatchId in interface FormBaseComponentIdProviderpublic abstract void validate(java.util.List validationResults)
FormItemThis method must be implemented by a specialised form item provider.
validate in interface FormItemorg.olat.core.gui.components.form.flexible.FormComponent#validate(java.util.List)public abstract void reset()
FormItem
reset in interface FormItemFormItem.reset()public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||