Class TextboxTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.FormElementTag
org.deltava.taglib.html.TextboxTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to generate HTML textbox elements.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class org.deltava.taglib.html.FormElementTag
_value
Fields inherited from class org.deltava.taglib.html.ElementTag
_classes, _data, _out
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Closes this TEXTAREA element by writing a >/TEXTAREA< tag.int
Opens this TEXTAREA element by writing a >TEXTAREA< tag.void
release()
void
setDisabled
(boolean disabled) Marks this textbox as disabled.void
setHeight
(int height) Sets the height of the textbox.void
Sets code to execute on this textbox's JavaScript onBlur() event.void
setOnChange
(String jsCode) Sets the JavaScript event for this element's onChange() event.void
Sets the Javascript to execute when the element is right-clicked.void
setReadOnly
(boolean readOnly) Marks this textbox as read-only.void
setResize
(boolean doResize) Sets whether the textbox should have auto-resize code enabled.void
setSpellcheck
(boolean sc) Marks this textbox as spellcheckable.final void
Updates the value for this textarea.void
Sets the width of the textbox.void
Sets the wrapping property for this textbox.Methods inherited from class org.deltava.taglib.html.FormElementTag
setDelimValues, setIdx, setName, setRequired, validateState
Methods inherited from class org.deltava.taglib.html.ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyle
Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
TextboxTag
public TextboxTag()Creates a new textbox element tag.
-
-
Method Details
-
doStartTag
Opens this TEXTAREA element by writing a >TEXTAREA< tag.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classElementTag
- Throws:
JspException
- if an error occurs
-
doEndTag
Closes this TEXTAREA element by writing a >/TEXTAREA< tag.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Throws:
JspException
- if an I/O error occurs
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classElementTag
-
setWidth
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
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
Sets code to execute on this textbox's JavaScript onBlur() event.- Parameters:
jsCode
- the JavaScript code
-
setOnChange
Sets the JavaScript event for this element's onChange() event.- Parameters:
jsCode
- the JavaScript code
-
setOnRightClick
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
Updates the value for this textarea. This is unsupported since the value of textareas is contained within their body.- Overrides:
setValue
in classFormElementTag
- Parameters:
obj
- the value(s) for this field- Throws:
UnsupportedOperationException
- always
-