PAJES 3.0.21

org.pajes.html
Class InputTextArea

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Input
          extended by org.pajes.html.InputField
              extended by org.pajes.html.InputTextArea
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML, InputMandatoryValidation, InputValidation

public class InputTextArea
extends InputField

This class creates an multi-line input text area in a form.

See Also:
Serialized Form

Field Summary
static int WRAP_DEFAULT
          Uses the browser default for wrapping.
static int WRAP_HARD
          Turns on physical (hard) wrapping.
static int WRAP_OFF
          Turns off wrapping.
static int WRAP_ON
          Turns on wrapping using the browser default.
static int WRAP_PHYSICAL
          Turns on physical (hard) wrapping.
static int WRAP_SOFT
          Turns on virtual (soft) wrapping.
static int WRAP_VIRTUAL
          Turns on virtual (soft) wrapping.
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
InputTextArea(Form form, java.lang.String name)
          Create a Textarea for the user to enter in multiline input field with a default size of 40 columns and 4 rows.
InputTextArea(Form form, java.lang.String name, java.lang.String value)
          Create a Textarea for the user to enter in multiline input field with a default size of 40 columns and 4 rows.
InputTextArea(Form form, java.lang.String name, java.lang.String value, int columnCount)
          Create a Textarea for the user to enter in multiline input field.
InputTextArea(Form form, java.lang.String name, java.lang.String value, int columnCount, int rowCount)
          Create a Textarea for the user to enter in multiline input field.
InputTextArea(Form form, java.lang.String name, java.lang.String value, int columnCount, int rowCount, boolean autoWrapText)
          Create a Textarea for the user to enter in multiline input field.
InputTextArea(Form form, java.lang.String name, java.lang.String value, int columnCount, int rowCount, boolean autoWrapText, boolean sendCRtoServer)
          Create a Textarea for the user to enter in multiline input field.
InputTextArea(InputField source)
          Creates a text area.
 
Method Summary
 java.lang.String getValue()
          Returns the value attribute of this INPUT element.
protected  void init()
          Called by the constructor and the Tag.destroy() method to correctly clear and initialise internal variables.
protected  void setAttribute(TagAttribute attribute)
          Adds the specified attribute.
 InputTextArea setAutoWrapText(boolean autoWrapText)
          Sets whether the text should wrap in the text area.
 InputTextArea setAutoWrapText(int method)
          Sets whether the text should wrap in the text area.
 InputTextArea setColumnCount(int columnCount)
          Sets the width of the text area in columns.
 InputTextArea setRowCount(int rowCount)
          Sets the number of lines of the text area.
 InputTextArea setSendCRtoServer(boolean sendCRtoServer)
          Changes wrapping from virtual to physical or physical to virtual.
 Input setValue(java.lang.String value)
          Sets the value attribute of this INPUT tag.
 void writeContent(Browser browser)
          Writes the <input> tag to the browser.
 
Methods inherited from class org.pajes.html.InputField
getClientValidation, getMaxLength, getSize, isMandatory, setMandatory, setMandatory, setMandatory, setMaxLength, setMaxLength, setSize, setSize
 
Methods inherited from class org.pajes.html.Input
addClientValidation, addContent, clone, getClientValidation, getDOMReference, getFieldNameForErrorMessage, getForm, getInstance, getLabel, getName, getOnBlurHandler, getOnChangeHandler, getOnFocusHandler, getOnSelectHandler, getReadOnlyStyleSheetClass, getTabIndex, getType, isChangeFlagEnabled, isDisabled, isReadOnly, isRequiringValidation, logNoFormWarning, removeClientValidation, removeClientValidation, removeClientValidation, removeMandatoryClientValidation, setChanged, setChangedFlag, setContent, setDisabled, setFieldNameInErrorMessage, setFieldNameInErrorMessage, setForm, setId, setLabel, setName, setOnBlurHandler, setOnBlurValidation, setOnChangeHandler, setOnClickHandler, setOnFocusHandler, setOnSelectHandler, setReadOnly, setReadOnlyStyleSheetClass, setTabIndex, setTabIndex, setTabIndex, write
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pajes.html.InputValidation
getDOMReference, getName, isRequiringValidation, setOnBlurValidation
 

Field Detail

WRAP_DEFAULT

public static final int WRAP_DEFAULT
Uses the browser default for wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_OFF

public static final int WRAP_OFF
Turns off wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_ON

public static final int WRAP_ON
Turns on wrapping using the browser default.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_HARD

public static final int WRAP_HARD
Turns on physical (hard) wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_PHYSICAL

public static final int WRAP_PHYSICAL
Turns on physical (hard) wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_SOFT

public static final int WRAP_SOFT
Turns on virtual (soft) wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values

WRAP_VIRTUAL

public static final int WRAP_VIRTUAL
Turns on virtual (soft) wrapping.

See Also:
setAutoWrapText(boolean), Constant Field Values
Constructor Detail

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name)
Create a Textarea for the user to enter in multiline input field with a default size of 40 columns and 4 rows.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name,
                     java.lang.String value)
Create a Textarea for the user to enter in multiline input field with a default size of 40 columns and 4 rows.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name,
                     java.lang.String value,
                     int columnCount)
Create a Textarea for the user to enter in multiline input field.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.
columnCount - - The width of the text area in columns

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name,
                     java.lang.String value,
                     int columnCount,
                     int rowCount)
Create a Textarea for the user to enter in multiline input field.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.
columnCount - - The with of the text area in columns
rowCount - - The nuber of rows displayed in the text area

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name,
                     java.lang.String value,
                     int columnCount,
                     int rowCount,
                     boolean autoWrapText)
Create a Textarea for the user to enter in multiline input field.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.
columnCount - - The with of the text area in columns
rowCount - - The nuber of rows displayed in the text area
autoWrapText - - Set to true if you want the text to wrap

InputTextArea

public InputTextArea(Form form,
                     java.lang.String name,
                     java.lang.String value,
                     int columnCount,
                     int rowCount,
                     boolean autoWrapText,
                     boolean sendCRtoServer)
Create a Textarea for the user to enter in multiline input field.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.
columnCount - - The with of the text area in columns
rowCount - - The nuber of rows displayed in the text area
autoWrapText - - Set to true if you want the text to wrap
sendCRtoServer - - if the text is set to autowrap and you want the enter/returns sent to the server set this to true

InputTextArea

public InputTextArea(InputField source)
Creates a text area.

Parameters:
source - the input field from which this input field will be created.
Method Detail

getValue

public java.lang.String getValue()
Returns the value attribute of this INPUT element.

Overrides:
getValue in class Input
Returns:
the value attribute of this INPUT element.

setAutoWrapText

public InputTextArea setAutoWrapText(boolean autoWrapText)
Sets whether the text should wrap in the text area.

Parameters:
autoWrapText - true if you want the text to wrap, or false to use the browser default setting.
Returns:
the modified InputTextArea object.

setAutoWrapText

public InputTextArea setAutoWrapText(int method)
Sets whether the text should wrap in the text area.

Parameters:
method - one of WRAP_DEFAULT, WRAP_OFF, WRAP_ON, WRAP_VIRTUAL or WRAP_PHYSICAL.
Returns:
the modified InputTextArea object.
Throws:
java.lang.IllegalArgumentException - if an invalid method is specified.

setColumnCount

public InputTextArea setColumnCount(int columnCount)
Sets the width of the text area in columns.

Parameters:
columnCount - the width of the text area in columns
Returns:
the modified InputTextArea object.

setRowCount

public InputTextArea setRowCount(int rowCount)
Sets the number of lines of the text area.

Parameters:
rowCount - the number of lines of the text area.
Returns:
the modified InputTextArea object.

setSendCRtoServer

public InputTextArea setSendCRtoServer(boolean sendCRtoServer)
Changes wrapping from virtual to physical or physical to virtual.

Parameters:
sendCRtoServer - - if the text is set to autowrap and you want the enter/returns sent to the server set this to true
Returns:
the modified InputTextArea object.

setValue

public Input setValue(java.lang.String value)
Sets the value attribute of this INPUT tag.

Overrides:
setValue in class Input
Parameters:
value - the value to assign.
Returns:
the modified Input object.

writeContent

public void writeContent(Browser browser)
                  throws java.io.IOException
Writes the <input> tag to the browser.

Overrides:
writeContent in class Tag
Parameters:
browser - the browser to which the results are to be output.
Throws:
java.io.IOException - if an I/O error occurs writing to the browser.
See Also:
Tag.setWriteEndTag(boolean)

init

protected void init()
Called by the constructor and the Tag.destroy() method to correctly clear and initialise internal variables.

Overrides:
init in class Tag

setAttribute

protected void setAttribute(TagAttribute attribute)
Adds the specified attribute.

Overrides:
setAttribute in class Tag
Parameters:
attribute - The attribute.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.