1. Domino UI
  2. Forms
  3. Text area
Top Basic Docs

Basic Text area

The TextAreaBox class is a form field component for text areas, providing features such as prefix and postfix elements, auto-sizing, and value adjustments.

Usage Example:

 
 // Create a TextAreaBox with auto-sizing
 TextAreaBox textArea = TextAreaBox.create().autoSize().setRows(4);

 // Create a TextAreaBox with a label
 TextAreaBox labeledTextArea = TextAreaBox.create("Comments");
 

See also :

Examples

Basic Use auto grow or fixed number of initial lines

API Docs: TextBox

Constructors

public void TextAreaBox()
Creates a new TextAreaBox instance with default values.
public void TextAreaBox(String label)
Creates a new TextAreaBox instance with the specified label.

label

The label text for the TextAreaBox.

Static methods

public static TextAreaBox create()
Factory method to create a new instance of TextAreaBox .

Returns:

a new instance of TextAreaBox

public static TextAreaBox create(String label)
Factory method to create a new instance of TextAreaBox with a label.

label

the label for the text area



Returns:

a new instance of TextAreaBox with the provided label

Public methods

public TextAreaBox setRows(int rows)
Sets the number of rows for the text area.

rows

The number of rows to set.



Returns:

This `TextAreaBox` instance.

public String getStringValue()
Gets the string value of this TextAreaBox, which is equivalent to its current value.

Returns:

The string value of this TextAreaBox.

public TextAreaBox autoSize()
Enables auto-sizing for the text area, allowing it to adjust its height automatically as the content grows.

Returns:

This `TextAreaBox` instance.

public TextAreaBox fixedSize()
Disables auto-sizing for the text area, fixing its height to the specified number of rows.

Returns:

This `TextAreaBox` instance.

public String getType()
Gets the type of the text area field.

Returns:

The type, which is always "text".

public String getName()
Gets the name attribute of the text area.

Returns:

The name attribute value.

public TextAreaBox setName(String name)
Sets the name attribute for the text area.

name

The name attribute value to set.



Returns:

This `TextAreaBox` instance.

We are a group of passionate people who love what we do

Donate & Support Us