org.olat.core.gui.components.form.flexible.impl.elements.richText
Class RichTextElementImpl
java.lang.Object
org.olat.core.gui.components.form.flexible.impl.FormItemImpl
org.olat.core.gui.components.form.flexible.impl.elements.AbstractTextElement
org.olat.core.gui.components.form.flexible.impl.elements.richText.RichTextElementImpl
- All Implemented Interfaces:
- InlineElement, RichTextElement, TextElement, FormBaseComponentIdProvider, FormItem, Disposable
public class RichTextElementImpl
- extends AbstractTextElement
- implements RichTextElement, Disposable
Description:
This class implements a rich text form element based on the TinyMCE
javascript library.
Initial Date: 21.04.2009
- Author:
- gnaegi
|
Constructor Summary |
RichTextElementImpl(java.lang.String name,
java.lang.String predefinedValue,
int rows,
int cols,
Form form)
Constructor for specialized TextElements, i.e. |
| Methods inherited from class org.olat.core.gui.components.form.flexible.impl.elements.AbstractTextElement |
getValue, isEmpty, isEmpty, reset, setDisplaySize, setIsEqualCheck, setItemValidatorProvider, setMaxLength, setNewOriginalValue, setNotEmptyCheck, setNotLongerThanCheck, setRegexMatchCheck, setValue, validate |
| Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormItemImpl |
clearError, doDispatchFormRequest, getAction, getActionListenersFor, getComponent, getEmptyDisplayText, getErrorC, getErrorText, getExampleC, getExampleText, getFormDispatchId, getLabelC, getLabelText, getName, getRootForm, getTranslator, getUserObject, hasError, hasExample, hasFocus, hasLabel, isEnabled, isInlineEditingOn, isMandatory, isVisible, setEmptyDisplayText, setEnabled, setErrorComponent, setErrorKey, setExampleKey, setFocus, setLabel, setLabelComponent, setMandatory, setRootForm, setTranslator, setUserObject, setVisible, 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.elements.TextElement |
getValue, isEmpty, isEmpty, setDisplaySize, setIsEqualCheck, setItemValidatorProvider, setMaxLength, setNewOriginalValue, setNotEmptyCheck, setNotLongerThanCheck, setRegexMatchCheck, setValue |
| Methods inherited from interface org.olat.core.gui.components.form.flexible.FormItem |
clearError, doDispatchFormRequest, 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 |
RichTextElementImpl
public RichTextElementImpl(java.lang.String name,
java.lang.String predefinedValue,
int rows,
int cols,
Form form)
- Constructor for specialized TextElements, i.e. IntegerElementImpl.
- Parameters:
name - predefinedValue - Initial valuerows - the number of lines or -1 to use default value (resizeable)cols - the number of characters per line or -1 to use 100% of the
available spaceform - The dispatch ID of the root form that deals with the submit button
getValue
public java.lang.String getValue()
- Description copied from interface:
TextElement
- Get the value of the text element.
- Specified by:
getValue in interface TextElement- Overrides:
getValue in class AbstractTextElement
- Returns:
- String
- See Also:
The returned value is XSS save and
does not contain executable JavaScript code. If you want to get the raw
user data use the getRawValue() method.
getRawValue
public java.lang.String getRawValue()
- Description copied from interface:
RichTextElement
- Get the raw value of the text element as submitted by the user. Be aware
that this method does NOT filter against XSS attacks! Use this only when
you manually check for XSS attacks or you allow users at this point to
add unsave data including javascript code.
- Specified by:
getRawValue in interface RichTextElement
- Returns:
- See Also:
RichTextElement.getRawValue()
evalFormRequest
public void evalFormRequest(UserRequest ureq)
- Description copied from class:
FormItemImpl
- 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
- Specified by:
evalFormRequest in interface FormItem- Specified by:
evalFormRequest in class FormItemImpl
- See Also:
org.olat.core.gui.components.form.flexible.FormItemImpl#evalFormRequest(org.olat.core.gui.UserRequest)
getEditorConfiguration
public RichTextConfiguration getEditorConfiguration()
- Description copied from interface:
RichTextElement
- Get the rich text editor configuration object
- Specified by:
getEditorConfiguration in interface RichTextElement
- Returns:
- See Also:
org.olat.core.gui.components.form.flexible.elements.RichTextElement#getRichTextConfiguration()
dispose
public void dispose()
- Description copied from interface:
Disposable
- disposes the disposable
- Specified by:
dispose in interface Disposable
- See Also:
Disposable.dispose()
addActionListener
public void addActionListener(Controller listener,
int action)
- Specified by:
addActionListener in interface FormItem- Overrides:
addActionListener in class FormItemImpl
- See Also:
org.olat.core.gui.components.form.flexible.FormItem#addActionListenerFor(org.olat.core.gui.control.Controller, int)