Class TextArea
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.forms.TextArea
- All Implemented Interfaces:
Component
Multi-line text input control.
Mutable and not thread-safe. Mutators update this instance in place. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.
-
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextAreaCreates a textarea.disabled()Marks textarea disabled.readonly()Marks textarea readonly.required()Marks textarea required.Sets autofocus attribute.Replaces class attribute withform-textarea <className>.withCols(int cols) Sets cols attribute.Sets id attribute.withMaxLength(int maxLength) Sets maximum allowed character count.withMaxWidth(String maxWidth) Sets inline max-width style.withMinLength(int minLength) Sets minimum required character count.withMinWidth(String minWidth) Sets inline min-width style.withPlaceholder(String placeholder) Sets placeholder attribute.withRows(int rows) Sets rows attribute.Replaces textarea content.Sets inline width style.Sets wrap behavior.Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withAttribute, withChild, withInnerText, withInnerText, withUnsafeHtml
-
Constructor Details
-
TextArea
Creates a textarea with required field name.- Parameters:
name- form field name
-
-
Method Details
-
create
-
withId
-
withValue
-
withPlaceholder
-
withRows
Sets rows attribute.- Parameters:
rows- row count- Returns:
- this textarea
-
withCols
Sets cols attribute.- Parameters:
cols- column count- Returns:
- this textarea
-
required
-
readonly
-
disabled
-
withMaxLength
Sets maximum allowed character count.- Parameters:
maxLength- max length- Returns:
- this textarea
-
withMinLength
Sets minimum required character count.- Parameters:
minLength- min length- Returns:
- this textarea
-
withClass
-
withAutofocus
-
withWrap
-
withWidth
-
withMaxWidth
Sets inline max-width style.- Overrides:
withMaxWidthin classHtmlTag- Parameters:
maxWidth- CSS max-width value- Returns:
- this textarea
-
withMinWidth
Sets inline min-width style.- Overrides:
withMinWidthin classHtmlTag- Parameters:
minWidth- CSS min-width value- Returns:
- this textarea
-