RapidContext
Access > Discovery > Insight
www.rapidcontext.com
Extends:
RapidContext.Widget
The text area widget class. Used to provide a text input field
spanning multiple rows, using the <textarea> HTML element.
Source code:
RapidContext_Widget_TextArea.js
RapidContext.Widget.TextArea(attrs)
Creates a new text area (or text box) widget.
|
The value to use on form reset.
|
|
The read-only widget disabled flag.
|
|
The read-only widget focused flag.
|
getValue()
Returns the text area value.
|
|
reset()
Resets the text area form value to the initial value.
|
|
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
|
onchange()
Emitted when the text is modified.
|
JavaScript:
var attrs = { name="description", helpText: "Description Text" };
var field = RapidContext.Widget.TextArea(attrs);
User Interface XML:
<TextArea name="description" helpText="Description Text" />
var value = field.getValue(); var lines = value.split("\n"); lines = MochiKit.Base.map(MochiKit.Format.strip, lines); value = lines.join("\n"); field.setAttrs({ "value": value });