Class TextboxTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class TextboxTag extends FormElementTag
A JSP tag to generate HTML textbox elements.
Since:
1.0
Version:
10.2
Author:
Luke
See Also:
  • Constructor Details

    • TextboxTag

      public TextboxTag()
      Creates a new textbox element tag.
  • Method Details

    • doStartTag

      public int doStartTag() throws JspException
      Opens this TEXTAREA element by writing a >TEXTAREA< tag.
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class ElementTag
      Throws:
      JspException - if an error occurs
    • doEndTag

      public int doEndTag() throws JspException
      Closes this TEXTAREA element by writing a >/TEXTAREA< tag.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Throws:
      JspException - if an I/O error occurs
    • release

      public void release()
      Specified by:
      release in interface Tag
      Overrides:
      release in class ElementTag
    • setWidth

      public void setWidth(String width)
      Sets the width of the textbox. This does nothing if a negative, zero or non-numeric value is passed.
      Parameters:
      width - the width of the textbox in columns, or as a percentage
    • setWrap

      public void setWrap(String wrapType)
      Sets the wrapping property for this textbox.
      Parameters:
      wrapType - the wrap type, PHYSICAL or VIRTUAL
    • setHeight

      public void setHeight(int height)
      Sets the height of the textbox. This does nothing if a negative, zero or non-numeric value is passed.
      Parameters:
      height - the height of the textbox in rows
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Marks this textbox as read-only.
      Parameters:
      readOnly - TRUE if read-only, otherwise FALSE
    • setDisabled

      public void setDisabled(boolean disabled)
      Marks this textbox as disabled.
      Parameters:
      disabled - TRUE if disabled, otherwise FALSE
    • setSpellcheck

      public void setSpellcheck(boolean sc)
      Marks this textbox as spellcheckable.
      Parameters:
      sc - TRUE if spellcheck enabled, otherwise FALSE
    • setOnBlur

      public void setOnBlur(String jsCode)
      Sets code to execute on this textbox's JavaScript onBlur() event.
      Parameters:
      jsCode - the JavaScript code
    • setOnChange

      public void setOnChange(String jsCode)
      Sets the JavaScript event for this element's onChange() event.
      Parameters:
      jsCode - the JavaScript code
    • setOnRightClick

      public void setOnRightClick(String js)
      Sets the Javascript to execute when the element is right-clicked.
      Parameters:
      js - the JavaScript code to execute
    • setResize

      public void setResize(boolean doResize)
      Sets whether the textbox should have auto-resize code enabled.
      Parameters:
      doResize - TRUE if auto-resize enabled, otherwise FALSE
    • setValue

      public final void setValue(Object obj)
      Updates the value for this textarea. This is unsupported since the value of textareas is contained within their body.
      Overrides:
      setValue in class FormElementTag
      Parameters:
      obj - the value(s) for this field
      Throws:
      UnsupportedOperationException - always