Class ElementTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
ButtonTag
,FormElementTag
,FormTag
,ImageTag
,LinkTag
,MapDIVTag
,RowTag
,StaticMapTag
,TableTag
,UserProfileTag
A class for supporting JSP Tags that render HTML elements.
- Since:
- 1.0
- Version:
- 10.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Collection
<String> protected final XMLRenderer
protected JspWriter
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
ElementTag
(String elementName) Creates a new HTML element tag with a given HTML element type. -
Method Summary
Modifier and TypeMethodDescriptionint
protected int
Gets and increments the current tab index count for the parent form tag.protected String
getName()
Returns the type of HTML element this tag generated.protected FormTag
Returns the parent form tag.void
release()
void
setClassName
(String cName) Sets the CSS class name of this HTML element.void
Sets the ID of this HTML element.protected void
setNumericAttr
(String attrName, int value, int minValue) Sets a numeric attribute.void
setPageContext
(PageContext ctxt) void
Associates a CSS style with this HTML element.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
-
_data
-
_classes
-
_out
-
-
Constructor Details
-
ElementTag
Creates a new HTML element tag with a given HTML element type.- Parameters:
elementName
- the HTML element type (eg. BODY, FORM, INPUT, etc.)
-
-
Method Details
-
getParentFormTag
Returns the parent form tag.- Returns:
- the parent FormTag, or null
-
getFormIndexCount
protected int getFormIndexCount()Gets and increments the current tab index count for the parent form tag.- Returns:
- the tabIndex
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-
getName
Returns the type of HTML element this tag generated.- Returns:
- the HTML element type
-
setID
-
setClassName
Sets the CSS class name of this HTML element.- Parameters:
cName
- the class name as refered to in a CSS file.
-
setStyle
Associates a CSS style with this HTML element.- Parameters:
style
- the CSS
-
setNumericAttr
Sets a numeric attribute.- Parameters:
attrName
- the attribute namevalue
- the valueminValue
- the minimum value for the attribute
-
setPageContext
- Specified by:
setPageContext
in interfaceTag
- Overrides:
setPageContext
in classTagSupport
-
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-