public class TextArea extends AbstractValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
ValueBox.AutoValidate, ValueBox.AutoValidator
BasicFormElement.FieldHandler<T>
BaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStyler
HasChangeHandlers.ChangeHandler<V>
HasValidation.Validator
changeHandlers, changeListener, DISABLED, fieldContainer, fieldGroup, FLOATING, FOCUSED, inputContainer, inputListener
ATTACH_UID_KEY, DETACH_UID_KEY, element
Modifier and Type | Method and Description |
---|---|
TextArea |
autoSize()
The TextArea will start with initial number of rows and will automatically grow if more lines
are added instead of showing scrollbars
|
protected void |
clearValue(boolean silent)
clear the field value
|
static TextArea |
create() |
static TextArea |
create(String label) |
protected ValueBox.AutoValidator |
createAutoValidator(ValueBox.AutoValidate autoValidate)
Create an AutoValidator that will automatically validate the component when it loses focus
|
protected elemental2.dom.HTMLTextAreaElement |
createInputElement(String type)
Creates an input element with the specified type
|
protected void |
doSetValue(String value) |
TextArea |
fixedSize()
The TextArea will show scrollbars when the text rows exceeds the rows from
setRows(int) |
String |
getStringValue() |
String |
getValue() |
boolean |
isEmptyAsNull() |
protected void |
onEnterKey() |
TextArea |
setEmptyAsNull(boolean emptyAsNull) |
TextArea |
setRows(int rows) |
clear, getMaxLength, getMinLength, getMinLengthErrorMessage, isEmpty, isEmptyIgnoreSpaces, setMaxLength, setMinLength, setMinLengthErrorMessage, setReadOnly, updateCharacterCount, value
addChangeHandler, addLeftAddOn, addLeftAddOn, addLeftAddOn, addOnClearHandler, addRightAddOn, addRightAddOn, addRightAddOn, allowEmptyLabel, asTableField, autoValidate, callChangeHandlers, changeLabelFloating, clear, clearInvalid, clearValue, condense, createLabelElement, createMandatoryAddOn, disable, doFocus, doUnfocus, element, enable, floating, floatLabel, focus, getAdditionalInfoContainer, getCountItem, getErrorItem, getErrorsContainer, getFieldContainer, getFieldGroup, getFieldInputContainer, getFieldStyle, getFocusColor, getHelperContainer, getHelpItem, getInputContainer, getInputElement, getLabelElement, getLabelTextElement, getLeftAddonContainer, getLeftAddOnsContainer, getMandatoryAddOn, getNotesContainer, getOnClearHandlers, getPlaceholder, getPostfix, getPostFixItem, getPrefix, getPrefixItem, getRightAddonContainer, getRightAddOnsContainer, hasChangeHandler, hideLabelText, hidePlaceholder, invalidate, invalidate, isAddFocusColor, isAutoValidation, isFloating, isFocused, isReadOnly, linkLabelToField, nonfloating, pauseChangeHandlers, pauseFocusValidation, removeChangeHandler, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOn, removeLeftAddOns, removeOnClearHandler, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOn, removeRightAddOns, resumeChangeHandlers, resumeFocusValidation, setAutoValidation, setFieldStyle, setFixErrorsPosition, setFloating, setFocusColor, setLabel, setLabel, setLabel, setLabel, setLabelTextVisible, setPauseChangeHandlers, setPlaceholder, setPostFix, setPrefix, setSpellCheck, setTableField, shouldShowPlaceholder, showLabelText, showPlaceholder, spread, unfloatLabel, unfocus, updateLabel, value
addValidator, getErrorLabels, getErrors, getHelperText, getLabel, getName, getRequiredErrorMessage, groupBy, hasValidator, isDisabled, isEnabled, isFixErrorsPosition, isRequired, isShowRequiredIndicator, isValidationDisabled, makeErrorLabel, removeValidator, setHelperText, setName, setRequired, setRequired, setRequiredErrorMessage, setShowRequiredIndicator, setValidationDisabled, setValue, showErrors, ungroup, validate, withValidationDisabled
add, add, addBeforeHideListener, addBeforeShowListener, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, config, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, elevate, elevate, firstChild, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getMetaObjects, getTextContent, getTooltip, getWavesElement, getZIndex, hasAttribute, hasChildNodes, hasCssClass, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isEmptyElement, isEqualNode, isForceHidden, isHidden, item, lastChild, length, nowOrWhenAttached, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeBeforeHideListener, removeBeforeShowListener, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowX, setOverFlowX, setOverFlowY, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWaves
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate, validateAll
isExpanded
add, add, remove, remove, removeProperty, replace, setProperty, setProperty
applyMeta, getMeta, removeMeta
public TextArea()
public TextArea(String label)
label
- Stringpublic static TextArea create()
public static TextArea create(String label)
label
- Stringprotected elemental2.dom.HTMLTextAreaElement createInputElement(String type)
createInputElement
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
type
- String the input element typepublic TextArea setRows(int rows)
rows
- int default number of rows of the TextAreaprotected void doSetValue(String value)
doSetValue
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
value
- V the value to set for this fieldprotected void clearValue(boolean silent)
clearValue
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
public String getValue()
public TextArea autoSize()
public TextArea fixedSize()
setRows(int)
public String getStringValue()
getStringValue
in interface HasInputElement
getStringValue
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
public TextArea setEmptyAsNull(boolean emptyAsNull)
emptyAsNull
- boolean, if true empty value will be considered null otherwise its normal
empty Stringpublic boolean isEmptyAsNull()
setEmptyAsNull(boolean)
protected ValueBox.AutoValidator createAutoValidator(ValueBox.AutoValidate autoValidate)
createAutoValidator
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
autoValidate
- ValueBox.AutoValidate
protected void onEnterKey()
onEnterKey
in class ValueBox<TextArea,elemental2.dom.HTMLTextAreaElement,String>
Copyright © 2019–2023 Dominokit. All rights reserved.