public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElementTag implements DynamicAttributes
Additionally, this base class allows for rendering non-standard attributes
as part of the tag's output. These attributes are accessible to subclasses if
needed via the dynamicAttributes
map.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_ATTRIBUTE |
static java.lang.String |
DIR_ATTRIBUTE |
static java.lang.String |
LANG_ATTRIBUTE |
static java.lang.String |
ONCLICK_ATTRIBUTE |
static java.lang.String |
ONDBLCLICK_ATTRIBUTE |
static java.lang.String |
ONKEYDOWN_ATTRIBUTE |
static java.lang.String |
ONKEYPRESS_ATTRIBUTE |
static java.lang.String |
ONKEYUP_ATTRIBUTE |
static java.lang.String |
ONMOUSEDOWN_ATTRIBUTE |
static java.lang.String |
ONMOUSEMOVE_ATTRIBUTE |
static java.lang.String |
ONMOUSEOUT_ATTRIBUTE |
static java.lang.String |
ONMOUSEOVER_ATTRIBUTE |
static java.lang.String |
ONMOUSEUP_ATTRIBUTE |
static java.lang.String |
STYLE_ATTRIBUTE |
static java.lang.String |
TABINDEX_ATTRIBUTE |
static java.lang.String |
TITLE_ATTRIBUTE |
NESTED_PATH_VARIABLE_NAME
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
AbstractHtmlElementTag() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCssClass()
Get the value of the '
class ' attribute. |
protected java.lang.String |
getCssErrorClass()
The CSS class to use when the field bound to a particular tag has errors.
|
protected java.lang.String |
getCssStyle()
Get the value of the '
style ' attribute. |
protected java.lang.String |
getDir()
Get the value of the '
dir ' attribute. |
protected java.util.Map<java.lang.String,java.lang.Object> |
getDynamicAttributes()
Get the map of dynamic attributes.
|
protected java.lang.String |
getLang()
Get the value of the '
lang ' attribute. |
protected java.lang.String |
getOnclick()
Get the value of the '
onclick ' attribute. |
protected java.lang.String |
getOndblclick()
Get the value of the '
ondblclick ' attribute. |
protected java.lang.String |
getOnkeydown()
Get the value of the '
onkeydown ' attribute. |
protected java.lang.String |
getOnkeypress()
Get the value of the '
onkeypress ' attribute. |
protected java.lang.String |
getOnkeyup()
Get the value of the '
onkeyup ' attribute. |
protected java.lang.String |
getOnmousedown()
Get the value of the '
onmousedown ' attribute. |
protected java.lang.String |
getOnmousemove()
Get the value of the '
onmousemove ' attribute. |
protected java.lang.String |
getOnmouseout()
Get the value of the '
onmouseout ' attribute. |
protected java.lang.String |
getOnmouseover()
Get the value of the '
onmouseover ' attribute. |
protected java.lang.String |
getOnmouseup()
Get the value of the '
onmouseup ' attribute. |
protected java.lang.String |
getTabindex()
Get the value of the '
tabindex ' attribute. |
protected java.lang.String |
getTitle()
Get the value of the '
title ' attribute. |
protected boolean |
isValidDynamicAttribute(java.lang.String localName,
java.lang.Object value)
Whether the given name-value pair is a valid dynamic attribute.
|
protected java.lang.String |
resolveCssClass()
Gets the appropriate CSS class to use based on the state of the current
BindStatus object. |
void |
setCssClass(java.lang.String cssClass)
Set the value of the '
class ' attribute. |
void |
setCssErrorClass(java.lang.String cssErrorClass)
The CSS class to use when the field bound to a particular tag has errors.
|
void |
setCssStyle(java.lang.String cssStyle)
Set the value of the '
style ' attribute. |
void |
setDir(java.lang.String dir)
Set the value of the '
dir ' attribute. |
void |
setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value) |
void |
setLang(java.lang.String lang)
Set the value of the '
lang ' attribute. |
void |
setOnclick(java.lang.String onclick)
Set the value of the '
onclick ' attribute. |
void |
setOndblclick(java.lang.String ondblclick)
Set the value of the '
ondblclick ' attribute. |
void |
setOnkeydown(java.lang.String onkeydown)
Set the value of the '
onkeydown ' attribute. |
void |
setOnkeypress(java.lang.String onkeypress)
Set the value of the '
onkeypress ' attribute. |
void |
setOnkeyup(java.lang.String onkeyup)
Set the value of the '
onkeyup ' attribute. |
void |
setOnmousedown(java.lang.String onmousedown)
Set the value of the '
onmousedown ' attribute. |
void |
setOnmousemove(java.lang.String onmousemove)
Set the value of the '
onmousemove ' attribute. |
void |
setOnmouseout(java.lang.String onmouseout)
Set the value of the '
onmouseout ' attribute. |
void |
setOnmouseover(java.lang.String onmouseover)
Set the value of the '
onmouseover ' attribute. |
void |
setOnmouseup(java.lang.String onmouseup)
Set the value of the '
onmouseup ' attribute. |
void |
setTabindex(java.lang.String tabindex)
Set the value of the '
tabindex ' attribute. |
void |
setTitle(java.lang.String title)
Set the value of the '
title ' attribute. |
protected void |
writeDefaultAttributes(TagWriter tagWriter)
Writes the default attributes configured via this base class to the supplied
TagWriter . |
protected void |
writeOptionalAttributes(TagWriter tagWriter)
Writes the optional attributes configured via this base class to the supplied
TagWriter . |
autogenerateId, convertToDisplayString, doFinally, getBindStatus, getBoundValue, getEditor, getId, getName, getNestedPath, getPath, getPropertyEditor, getPropertyPath, processFieldValue, resolveId, setId, setPath
createTagWriter, doStartTagInternal, evaluate, getDisplayString, getDisplayString, isDefaultHtmlEscape, writeOptionalAttribute, writeTagContent
htmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
doCatch, doStartTag, getRequestContext
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
public static final java.lang.String CLASS_ATTRIBUTE
public static final java.lang.String STYLE_ATTRIBUTE
public static final java.lang.String LANG_ATTRIBUTE
public static final java.lang.String TITLE_ATTRIBUTE
public static final java.lang.String DIR_ATTRIBUTE
public static final java.lang.String TABINDEX_ATTRIBUTE
public static final java.lang.String ONCLICK_ATTRIBUTE
public static final java.lang.String ONDBLCLICK_ATTRIBUTE
public static final java.lang.String ONMOUSEDOWN_ATTRIBUTE
public static final java.lang.String ONMOUSEUP_ATTRIBUTE
public static final java.lang.String ONMOUSEOVER_ATTRIBUTE
public static final java.lang.String ONMOUSEMOVE_ATTRIBUTE
public static final java.lang.String ONMOUSEOUT_ATTRIBUTE
public static final java.lang.String ONKEYPRESS_ATTRIBUTE
public static final java.lang.String ONKEYUP_ATTRIBUTE
public static final java.lang.String ONKEYDOWN_ATTRIBUTE
public void setCssClass(java.lang.String cssClass)
class
' attribute.
May be a runtime expression.protected java.lang.String getCssClass()
class
' attribute.
May be a runtime expression.public void setCssErrorClass(java.lang.String cssErrorClass)
protected java.lang.String getCssErrorClass()
public void setCssStyle(java.lang.String cssStyle)
style
' attribute.
May be a runtime expression.protected java.lang.String getCssStyle()
style
' attribute.
May be a runtime expression.public void setLang(java.lang.String lang)
lang
' attribute.
May be a runtime expression.protected java.lang.String getLang()
lang
' attribute.
May be a runtime expression.public void setTitle(java.lang.String title)
title
' attribute.
May be a runtime expression.protected java.lang.String getTitle()
title
' attribute.
May be a runtime expression.public void setDir(java.lang.String dir)
dir
' attribute.
May be a runtime expression.protected java.lang.String getDir()
dir
' attribute.
May be a runtime expression.public void setTabindex(java.lang.String tabindex)
tabindex
' attribute.
May be a runtime expression.protected java.lang.String getTabindex()
tabindex
' attribute.
May be a runtime expression.public void setOnclick(java.lang.String onclick)
onclick
' attribute.
May be a runtime expression.protected java.lang.String getOnclick()
onclick
' attribute.
May be a runtime expression.public void setOndblclick(java.lang.String ondblclick)
ondblclick
' attribute.
May be a runtime expression.protected java.lang.String getOndblclick()
ondblclick
' attribute.
May be a runtime expression.public void setOnmousedown(java.lang.String onmousedown)
onmousedown
' attribute.
May be a runtime expression.protected java.lang.String getOnmousedown()
onmousedown
' attribute.
May be a runtime expression.public void setOnmouseup(java.lang.String onmouseup)
onmouseup
' attribute.
May be a runtime expression.protected java.lang.String getOnmouseup()
onmouseup
' attribute.
May be a runtime expression.public void setOnmouseover(java.lang.String onmouseover)
onmouseover
' attribute.
May be a runtime expression.protected java.lang.String getOnmouseover()
onmouseover
' attribute.
May be a runtime expression.public void setOnmousemove(java.lang.String onmousemove)
onmousemove
' attribute.
May be a runtime expression.protected java.lang.String getOnmousemove()
onmousemove
' attribute.
May be a runtime expression.public void setOnmouseout(java.lang.String onmouseout)
onmouseout
' attribute.
May be a runtime expression.protected java.lang.String getOnmouseout()
onmouseout
' attribute.
May be a runtime expression.public void setOnkeypress(java.lang.String onkeypress)
onkeypress
' attribute.
May be a runtime expression.protected java.lang.String getOnkeypress()
onkeypress
' attribute.
May be a runtime expression.public void setOnkeyup(java.lang.String onkeyup)
onkeyup
' attribute.
May be a runtime expression.protected java.lang.String getOnkeyup()
onkeyup
' attribute.
May be a runtime expression.public void setOnkeydown(java.lang.String onkeydown)
onkeydown
' attribute.
May be a runtime expression.protected java.lang.String getOnkeydown()
onkeydown
' attribute.
May be a runtime expression.protected java.util.Map<java.lang.String,java.lang.Object> getDynamicAttributes()
public void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value) throws JspException
setDynamicAttribute
in interface DynamicAttributes
JspException
protected boolean isValidDynamicAttribute(java.lang.String localName, java.lang.Object value)
protected void writeDefaultAttributes(TagWriter tagWriter) throws JspException
TagWriter
.
Subclasses should call this when they want the base attribute set to be written to the output.writeDefaultAttributes
in class AbstractDataBoundFormElementTag
tagWriter
- the TagWriter
to which any attributes are to be writtenJspException
protected void writeOptionalAttributes(TagWriter tagWriter) throws JspException
TagWriter
.
The set of optional attributes that will be rendered includes any non-standard dynamic attributes.
Called by writeDefaultAttributes(TagWriter)
.JspException
protected java.lang.String resolveCssClass() throws JspException
BindStatus
object.JspException