Class FormElementTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.FormElementTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
CheckTag
,ComboTag
,FileUploadTag
,InputTag
,SingleTag
,TextboxTag
A class for supporting JSP tags that generate HTML input elements.
- Since:
- 1.0
- Version:
- 10.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotected
FormElementTag
(String elementName, boolean validateParent) Generates an input element tag with a given name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDelimValues
(String values) Sets multiple values for this input element.void
Sets the tab index of this field.void
Sets the name of this field.void
setRequired
(boolean isRequired) Sets this field as required for HTML5 browsers.void
Sets the value of this input element.protected void
Validates tag state.Methods inherited from class org.deltava.taglib.html.ElementTag
doStartTag, getFormIndexCount, getName, getParentFormTag, release, setClassName, setID, setNumericAttr, setPageContext, setStyle
Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Field Details
-
_value
The value of this input element.
-
-
Constructor Details
-
FormElementTag
Generates an input element tag with a given name.- Parameters:
elementName
- the HTML element namevalidateParent
- TRUE if parent validation is enabled, otherwise FALSE- See Also:
-
-
Method Details
-
setName
-
setIdx
Sets the tab index of this field. This does nothing if a negative, zero or non-numeric value is passed.- Parameters:
index
- the tab index, or * if it should be retrieved from the parent form.- See Also:
-
setValue
Sets the value of this input element. Each implementer needs to render multiple values appropriately.- Parameters:
value
- the value(s) for this field
-
setRequired
public void setRequired(boolean isRequired) Sets this field as required for HTML5 browsers.- Parameters:
isRequired
- TRUE if required, otherwise FALSE
-
setDelimValues
Sets multiple values for this input element.- Parameters:
values
- a comma-delimited list of values
-
validateState
protected void validateState()Validates tag state.- Throws:
IllegalStateException
- if not in a FORM and is required
-