Class TextboxTag
java.lang.Object
jakarta.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:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
A JSP tag to generate HTML textbox elements.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class FormElementTag
_valueFields inherited from class ElementTag
_classes, _data, _outFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Closes this TEXTAREA element by writing a >/TEXTAREA< tag.intOpens this TEXTAREA element by writing a >TEXTAREA< tag.voidrelease()voidsetDisabled(boolean disabled) Marks this textbox as disabled.voidsetHeight(int height) Sets the height of the textbox.voidSets code to execute on this textbox's JavaScript onBlur() event.voidsetOnChange(String jsCode) Sets the JavaScript event for this element's onChange() event.voidSets the Javascript to execute when the element is right-clicked.voidsetReadOnly(boolean readOnly) Marks this textbox as read-only.voidsetResize(boolean doResize) Sets whether the textbox should have auto-resize code enabled.voidsetSpellcheck(boolean sc) Marks this textbox as spellcheckable.final voidUpdates the value for this textarea.voidSets the width of the textbox.voidSets the wrapping property for this textbox.Methods inherited from class FormElementTag
setDelimValues, setIdx, setName, setRequired, validateStateMethods inherited from class ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleMethods inherited from class BrowserInfoTag
getBrowserContext, passedCAPTCHAMethods inherited from class jakarta.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
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionOpens this TEXTAREA element by writing a >TEXTAREA< tag.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classElementTag- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionCloses this TEXTAREA element by writing a >/TEXTAREA< tag.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException- if an I/O error occurs
-
release
public void release()- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein 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:
setValuein classFormElementTag- Parameters:
obj- the value(s) for this field- Throws:
UnsupportedOperationException- always
-