类 AbstractHtmlElementTag
- java.lang.Object
- javax.servlet.jsp.tagext.TagSupport
- org.springframework.web.servlet.tags.RequestContextAwareTag
- org.springframework.web.servlet.tags.HtmlEscapingAwareTag
- org.springframework.web.servlet.tags.form.AbstractFormTag
- org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
- org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
- 所有已实现的接口:
Serializable
,DynamicAttributes
,IterationTag
,JspTag
,Tag
,TryCatchFinally
,EditorAwareTag
- 直接已知子类:
AbstractHtmlElementBodyTag
,AbstractHtmlInputElementTag
,ButtonTag
,FormTag
,HiddenInputTag
,LabelTag
,OptionsTag
public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElementTag implements DynamicAttributes
Base class for databinding-aware JSP tags that render HTML element. Provides a set of properties corresponding to the set of HTML attributes that are common across elements.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.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Jeremy Grelle, Rossen Stoyanchev
- 另请参阅:
- 序列化表格
字段概要
字段 修饰符和类型 字段 说明 static String
CLASS_ATTRIBUTE
static String
DIR_ATTRIBUTE
static String
LANG_ATTRIBUTE
static String
ONCLICK_ATTRIBUTE
static String
ONDBLCLICK_ATTRIBUTE
static String
ONKEYDOWN_ATTRIBUTE
static String
ONKEYPRESS_ATTRIBUTE
static String
ONKEYUP_ATTRIBUTE
static String
ONMOUSEDOWN_ATTRIBUTE
static String
ONMOUSEMOVE_ATTRIBUTE
static String
ONMOUSEOUT_ATTRIBUTE
static String
ONMOUSEOVER_ATTRIBUTE
static String
ONMOUSEUP_ATTRIBUTE
static String
STYLE_ATTRIBUTE
static String
TABINDEX_ATTRIBUTE
static String
TITLE_ATTRIBUTE
从类继承的字段 org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
NESTED_PATH_VARIABLE_NAME
从类继承的字段 org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
从类继承的字段 javax.servlet.jsp.tagext.TagSupport
pageContext
从接口继承的字段 javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
从接口继承的字段 javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
构造器概要
构造器 构造器 说明 AbstractHtmlElementTag()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected String
getCssClass()
Get the value of the 'class
' attribute.protected String
getCssErrorClass()
The CSS class to use when the field bound to a particular tag has errors.protected String
getCssStyle()
Get the value of the 'style
' attribute.protected String
getDir()
Get the value of the 'dir
' attribute.protected Map<String,Object>
getDynamicAttributes()
Get the map of dynamic attributes.protected String
getLang()
Get the value of the 'lang
' attribute.protected String
getOnclick()
Get the value of the 'onclick
' attribute.protected String
getOndblclick()
Get the value of the 'ondblclick
' attribute.protected String
getOnkeydown()
Get the value of the 'onkeydown
' attribute.protected String
getOnkeypress()
Get the value of the 'onkeypress
' attribute.protected String
getOnkeyup()
Get the value of the 'onkeyup
' attribute.protected String
getOnmousedown()
Get the value of the 'onmousedown
' attribute.protected String
getOnmousemove()
Get the value of the 'onmousemove
' attribute.protected String
getOnmouseout()
Get the value of the 'onmouseout
' attribute.protected String
getOnmouseover()
Get the value of the 'onmouseover
' attribute.protected String
getOnmouseup()
Get the value of the 'onmouseup
' attribute.protected String
getTabindex()
Get the value of the 'tabindex
' attribute.protected String
getTitle()
Get the value of the 'title
' attribute.protected boolean
isValidDynamicAttribute(String localName, Object value)
Whether the given name-value pair is a valid dynamic attribute.protected String
resolveCssClass()
Gets the appropriate CSS class to use based on the state of the currentBindStatus
object.void
setCssClass(String cssClass)
Set the value of the 'class
' attribute.void
setCssErrorClass(String cssErrorClass)
The CSS class to use when the field bound to a particular tag has errors.void
setCssStyle(String cssStyle)
Set the value of the 'style
' attribute.void
setDir(String dir)
Set the value of the 'dir
' attribute.void
setDynamicAttribute(String uri, String localName, Object value)
void
setLang(String lang)
Set the value of the 'lang
' attribute.void
setOnclick(String onclick)
Set the value of the 'onclick
' attribute.void
setOndblclick(String ondblclick)
Set the value of the 'ondblclick
' attribute.void
setOnkeydown(String onkeydown)
Set the value of the 'onkeydown
' attribute.void
setOnkeypress(String onkeypress)
Set the value of the 'onkeypress
' attribute.void
setOnkeyup(String onkeyup)
Set the value of the 'onkeyup
' attribute.void
setOnmousedown(String onmousedown)
Set the value of the 'onmousedown
' attribute.void
setOnmousemove(String onmousemove)
Set the value of the 'onmousemove
' attribute.void
setOnmouseout(String onmouseout)
Set the value of the 'onmouseout
' attribute.void
setOnmouseover(String onmouseover)
Set the value of the 'onmouseover
' attribute.void
setOnmouseup(String onmouseup)
Set the value of the 'onmouseup
' attribute.void
setTabindex(String tabindex)
Set the value of the 'tabindex
' attribute.void
setTitle(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 suppliedTagWriter
.protected void
writeOptionalAttributes(TagWriter tagWriter)
Writes the optional attributes configured via this base class to the suppliedTagWriter
.从类继承的方法 org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
autogenerateId, convertToDisplayString, doFinally, getBindStatus, getBoundValue, getEditor, getId, getName, getNestedPath, getPath, getPropertyEditor, getPropertyPath, processFieldValue, resolveId, setId, setPath
从类继承的方法 org.springframework.web.servlet.tags.form.AbstractFormTag
createTagWriter, doStartTagInternal, evaluate, getDisplayString, getDisplayString, isDefaultHtmlEscape, writeOptionalAttribute, writeTagContent
从类继承的方法 org.springframework.web.servlet.tags.HtmlEscapingAwareTag
htmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
从类继承的方法 org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doStartTag, getRequestContext
从类继承的方法 javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
字段详细资料
CLASS_ATTRIBUTE
public static final String CLASS_ATTRIBUTE
- 另请参阅:
- 常量字段值
STYLE_ATTRIBUTE
public static final String STYLE_ATTRIBUTE
- 另请参阅:
- 常量字段值
LANG_ATTRIBUTE
public static final String LANG_ATTRIBUTE
- 另请参阅:
- 常量字段值
TITLE_ATTRIBUTE
public static final String TITLE_ATTRIBUTE
- 另请参阅:
- 常量字段值
DIR_ATTRIBUTE
public static final String DIR_ATTRIBUTE
- 另请参阅:
- 常量字段值
TABINDEX_ATTRIBUTE
public static final String TABINDEX_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONCLICK_ATTRIBUTE
public static final String ONCLICK_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONDBLCLICK_ATTRIBUTE
public static final String ONDBLCLICK_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONMOUSEDOWN_ATTRIBUTE
public static final String ONMOUSEDOWN_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONMOUSEUP_ATTRIBUTE
public static final String ONMOUSEUP_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONMOUSEOVER_ATTRIBUTE
public static final String ONMOUSEOVER_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONMOUSEMOVE_ATTRIBUTE
public static final String ONMOUSEMOVE_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONMOUSEOUT_ATTRIBUTE
public static final String ONMOUSEOUT_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONKEYPRESS_ATTRIBUTE
public static final String ONKEYPRESS_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONKEYUP_ATTRIBUTE
public static final String ONKEYUP_ATTRIBUTE
- 另请参阅:
- 常量字段值
ONKEYDOWN_ATTRIBUTE
public static final String ONKEYDOWN_ATTRIBUTE
- 另请参阅:
- 常量字段值
构造器详细资料
AbstractHtmlElementTag
public AbstractHtmlElementTag()
方法详细资料
setCssClass
public void setCssClass(String cssClass)
Set the value of the 'class
' attribute. May be a runtime expression.
getCssClass
@Nullable protected String getCssClass()
Get the value of the 'class
' attribute. May be a runtime expression.
setCssErrorClass
public void setCssErrorClass(String cssErrorClass)
The CSS class to use when the field bound to a particular tag has errors. May be a runtime expression.
getCssErrorClass
@Nullable protected String getCssErrorClass()
The CSS class to use when the field bound to a particular tag has errors. May be a runtime expression.
setCssStyle
public void setCssStyle(String cssStyle)
Set the value of the 'style
' attribute. May be a runtime expression.
getCssStyle
@Nullable protected String getCssStyle()
Get the value of the 'style
' attribute. May be a runtime expression.
setLang
public void setLang(String lang)
Set the value of the 'lang
' attribute. May be a runtime expression.
getLang
@Nullable protected String getLang()
Get the value of the 'lang
' attribute. May be a runtime expression.
setTitle
public void setTitle(String title)
Set the value of the 'title
' attribute. May be a runtime expression.
getTitle
@Nullable protected String getTitle()
Get the value of the 'title
' attribute. May be a runtime expression.
setDir
public void setDir(String dir)
Set the value of the 'dir
' attribute. May be a runtime expression.
getDir
@Nullable protected String getDir()
Get the value of the 'dir
' attribute. May be a runtime expression.
setTabindex
public void setTabindex(String tabindex)
Set the value of the 'tabindex
' attribute. May be a runtime expression.
getTabindex
@Nullable protected String getTabindex()
Get the value of the 'tabindex
' attribute. May be a runtime expression.
setOnclick
public void setOnclick(String onclick)
Set the value of the 'onclick
' attribute. May be a runtime expression.
getOnclick
@Nullable protected String getOnclick()
Get the value of the 'onclick
' attribute. May be a runtime expression.
setOndblclick
public void setOndblclick(String ondblclick)
Set the value of the 'ondblclick
' attribute. May be a runtime expression.
getOndblclick
@Nullable protected String getOndblclick()
Get the value of the 'ondblclick
' attribute. May be a runtime expression.
setOnmousedown
public void setOnmousedown(String onmousedown)
Set the value of the 'onmousedown
' attribute. May be a runtime expression.
getOnmousedown
@Nullable protected String getOnmousedown()
Get the value of the 'onmousedown
' attribute. May be a runtime expression.
setOnmouseup
public void setOnmouseup(String onmouseup)
Set the value of the 'onmouseup
' attribute. May be a runtime expression.
getOnmouseup
@Nullable protected String getOnmouseup()
Get the value of the 'onmouseup
' attribute. May be a runtime expression.
setOnmouseover
public void setOnmouseover(String onmouseover)
Set the value of the 'onmouseover
' attribute. May be a runtime expression.
getOnmouseover
@Nullable protected String getOnmouseover()
Get the value of the 'onmouseover
' attribute. May be a runtime expression.
setOnmousemove
public void setOnmousemove(String onmousemove)
Set the value of the 'onmousemove
' attribute. May be a runtime expression.
getOnmousemove
@Nullable protected String getOnmousemove()
Get the value of the 'onmousemove
' attribute. May be a runtime expression.
setOnmouseout
public void setOnmouseout(String onmouseout)
Set the value of the 'onmouseout
' attribute. May be a runtime expression.
getOnmouseout
@Nullable protected String getOnmouseout()
Get the value of the 'onmouseout
' attribute. May be a runtime expression.
setOnkeypress
public void setOnkeypress(String onkeypress)
Set the value of the 'onkeypress
' attribute. May be a runtime expression.
getOnkeypress
@Nullable protected String getOnkeypress()
Get the value of the 'onkeypress
' attribute. May be a runtime expression.
setOnkeyup
public void setOnkeyup(String onkeyup)
Set the value of the 'onkeyup
' attribute. May be a runtime expression.
getOnkeyup
@Nullable protected String getOnkeyup()
Get the value of the 'onkeyup
' attribute. May be a runtime expression.
setOnkeydown
public void setOnkeydown(String onkeydown)
Set the value of the 'onkeydown
' attribute. May be a runtime expression.
getOnkeydown
@Nullable protected String getOnkeydown()
Get the value of the 'onkeydown
' attribute. May be a runtime expression.
getDynamicAttributes
@Nullable protected Map<String,Object> getDynamicAttributes()
Get the map of dynamic attributes.
setDynamicAttribute
public void setDynamicAttribute(String uri, String localName, Object value) throws JspException
- 指定者:
setDynamicAttribute
在接口中DynamicAttributes
- 抛出:
JspException
isValidDynamicAttribute
protected boolean isValidDynamicAttribute(String localName, Object value)
Whether the given name-value pair is a valid dynamic attribute.
writeDefaultAttributes
protected void writeDefaultAttributes(TagWriter tagWriter) throws JspException
Writes the default attributes configured via this base class to the suppliedTagWriter
. Subclasses should call this when they want the base attribute set to be written to the output.- 覆盖:
writeDefaultAttributes
在类中AbstractDataBoundFormElementTag
- 参数:
tagWriter
- theTagWriter
to which any attributes are to be written- 抛出:
JspException
writeOptionalAttributes
protected void writeOptionalAttributes(TagWriter tagWriter) throws JspException
Writes the optional attributes configured via this base class to the suppliedTagWriter
. The set of optional attributes that will be rendered includes any non-standard dynamic attributes. Called bywriteDefaultAttributes(TagWriter)
.- 抛出:
JspException
resolveCssClass
protected String resolveCssClass() throws JspException
Gets the appropriate CSS class to use based on the state of the currentBindStatus
object.- 抛出:
JspException