|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput com.sun.rave.web.ui.component.HiddenFieldBase com.sun.rave.web.ui.component.HiddenField com.sun.rave.web.ui.component.FieldBase com.sun.rave.web.ui.component.Field com.sun.rave.web.ui.component.TextAreaBase
Use the ui:textArea
tag to create a multiple-line
input field for text.
The textArea component renders an HTML <textarea> element.
ui:textArea
TagUse the text
attribute to associate
the component with a model object that represents the current value,
by setting the attribute's value to a JavaServer Faces EL expression
that evaluates to a backing bean or a backing bean property.
To optionally specify a label for the component, use the
label
attribute, or specify a label facet.
label
: use this facet to specify a custom
component for the label.readOnly
: use this facet to specify a custom
component for displaying the readOnly value of this component.The input element has a style class "TxtAra", or "TxtAraDis" when the field is disabled. If a label attribute is specified, the label element's class attribute is set to "LstAln" followed by "LblLvl1Txt", "LblLvl2Txt" or "LblLvl3Txt" depending on the label level.
In all the functions below, <id>
should be
the generated id of the TextArea component.
field_setDisabled(<id>, <disabled>)
|
Enable/disable the field. Set <disabled>
to true to disable the component, or false to enable it.
|
field_setValue(<id>, <newValue>)
|
Set the value of the field to <newValue> .
|
field_getValue(<id>)
|
Get the value of the field. |
field_getInputElement(<id>) |
Get hold of a reference to the textArea element rendered by this component. |
component_setVisible(<id>)
|
Hide or show this component. |
This example uses a backing bean FieldTest
with a property
string. The tag generates a textarea with a label "Comment:". The
rows and columns attributes have been set, to ensure that the
component has the same size on all browsers.
<ui:textArea id="textarea" type="textarea" label="Comment:" text="#{FieldTest.string}" rows="5" columns="50"/>
Auto-generated component class. Do NOT modify; all changes will be lost!
Field Summary |
Fields inherited from class com.sun.rave.web.ui.component.Field |
INPUT_ID, LABEL_FACET, LABEL_ID, READONLY_FACET, READONLY_ID |
Fields inherited from class javax.faces.component.UIInput |
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID |
Constructor Summary | |
TextAreaBase()
Construct a new TextAreaBase . |
Method Summary | |
java.lang.String |
getFamily()
Return the family for this component. |
int |
getRows()
Number of rows used to render the textarea. |
void |
restoreState(javax.faces.context.FacesContext _context,
java.lang.Object _state)
Restore the state of this component. |
java.lang.Object |
saveState(javax.faces.context.FacesContext _context)
Save the state of this component. |
void |
setRows(int rows)
Number of rows used to render the textarea. |
Methods inherited from class com.sun.rave.web.ui.component.Field |
getColumns, getLabelComponent, getPrimaryElementID, getReadOnlyComponent, log, setText |
Methods inherited from class com.sun.rave.web.ui.component.FieldBase |
getLabel, getLabelLevel, getMaxLength, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getStyleClass, getTabIndex, getText, getToolTip, getValueBinding, isDisabled, isReadOnly, isTrim, isVisible, setColumns, setDisabled, setLabel, setLabelLevel, setMaxLength, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setStyle, setStyleClass, setTabIndex, setToolTip, setTrim, setValueBinding, setVisible |
Methods inherited from class com.sun.rave.web.ui.component.HiddenField |
getConvertedValue, getReadOnlyValueString, getValueAsString |
Methods inherited from class javax.faces.component.UIInput |
addValidator, addValueChangeListener, broadcast, compareValues, decode, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate, validateValue |
Methods inherited from class javax.faces.component.UIOutput |
getConverter, getLocalValue, getValue, setConverter |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.ValueHolder |
getConverter, getLocalValue, getValue, setConverter |
Constructor Detail |
public TextAreaBase()
Construct a new TextAreaBase
.
Method Detail |
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class FieldBase
public int getRows()
Number of rows used to render the textarea. You should set a value for this attribute to ensure that it is rendered correctly in all browsers. Browsers vary in the default number of rows used for textarea fields.
public void setRows(int rows)
Number of rows used to render the textarea. You should set a value for this attribute to ensure that it is rendered correctly in all browsers. Browsers vary in the default number of rows used for textarea fields.
getRows()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class FieldBase
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class FieldBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |