类 AbstractCheckedElementTag
- 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
- org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
- org.springframework.web.servlet.tags.form.AbstractCheckedElementTag
- 所有已实现的接口:
Serializable
,DynamicAttributes
,IterationTag
,JspTag
,Tag
,TryCatchFinally
,EditorAwareTag
public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElementTag
Abstract base class to provide common methods for implementing databinding-aware JSP tags for rendering an HTML 'input
' element with a 'type
' of 'checkbox
' or 'radio
'.- 从以下版本开始:
- 2.5
- 作者:
- Thomas Risberg, Juergen Hoeller, Rossen Stoyanchev
- 另请参阅:
- 序列化表格
字段概要
从类继承的字段 org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
ACCESSKEY_ATTRIBUTE, DISABLED_ATTRIBUTE, ONBLUR_ATTRIBUTE, ONCHANGE_ATTRIBUTE, ONFOCUS_ATTRIBUTE, READONLY_ATTRIBUTE
从类继承的字段 org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
CLASS_ATTRIBUTE, DIR_ATTRIBUTE, LANG_ATTRIBUTE, ONCLICK_ATTRIBUTE, ONDBLCLICK_ATTRIBUTE, ONKEYDOWN_ATTRIBUTE, ONKEYPRESS_ATTRIBUTE, ONKEYUP_ATTRIBUTE, ONMOUSEDOWN_ATTRIBUTE, ONMOUSEMOVE_ATTRIBUTE, ONMOUSEOUT_ATTRIBUTE, ONMOUSEOVER_ATTRIBUTE, ONMOUSEUP_ATTRIBUTE, STYLE_ATTRIBUTE, TABINDEX_ATTRIBUTE, 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
构造器概要
构造器 构造器 说明 AbstractCheckedElementTag()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected String
autogenerateId()
Return a unique ID for the bound name within the current PageContext.protected abstract String
getInputType()
Return the type of the HTML input element to generate: "checkbox" or "radio".protected boolean
isValidDynamicAttribute(String localName, Object value)
Flags "type" as an illegal dynamic attribute.protected void
renderFromBoolean(Boolean boundValue, TagWriter tagWriter)
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied Boolean istrue
.protected void
renderFromValue(Object item, Object value, TagWriter tagWriter)
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied value matches the bound value.protected void
renderFromValue(Object value, TagWriter tagWriter)
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied value matches the bound value.protected abstract int
writeTagContent(TagWriter tagWriter)
Writes the 'input
' element to the suppliedTagWriter
, marking it as 'checked' if appropriate.从类继承的方法 org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag
getAccesskey, getOnblur, getOnchange, getOnfocus, isDisabled, isReadonly, setAccesskey, setDisabled, setOnblur, setOnchange, setOnfocus, setReadonly, writeOptionalAttributes
从类继承的方法 org.springframework.web.servlet.tags.form.AbstractHtmlElementTag
getCssClass, getCssErrorClass, getCssStyle, getDir, getDynamicAttributes, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getTabindex, getTitle, resolveCssClass, setCssClass, setCssErrorClass, setCssStyle, setDir, setDynamicAttribute, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setTabindex, setTitle, writeDefaultAttributes
从类继承的方法 org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag
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
从类继承的方法 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
构造器详细资料
AbstractCheckedElementTag
public AbstractCheckedElementTag()
方法详细资料
renderFromValue
protected void renderFromValue(Object value, TagWriter tagWriter) throws JspException
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied value matches the bound value.- 抛出:
JspException
renderFromValue
protected void renderFromValue(Object item, Object value, TagWriter tagWriter) throws JspException
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied value matches the bound value.- 抛出:
JspException
renderFromBoolean
protected void renderFromBoolean(Boolean boundValue, TagWriter tagWriter) throws JspException
Render the 'input(checkbox)
' with the supplied value, marking the 'input
' element as 'checked' if the supplied Boolean istrue
.- 抛出:
JspException
autogenerateId
protected String autogenerateId() throws JspException
Return a unique ID for the bound name within the current PageContext.
writeTagContent
protected abstract int writeTagContent(TagWriter tagWriter) throws JspException
Writes the 'input
' element to the suppliedTagWriter
, marking it as 'checked' if appropriate.- 指定者:
writeTagContent
在类中AbstractFormTag
- 返回:
- valid tag render instruction as per
Tag.doStartTag()
. - 抛出:
JspException
isValidDynamicAttribute
protected boolean isValidDynamicAttribute(String localName, Object value)
Flags "type" as an illegal dynamic attribute.
getInputType
protected abstract String getInputType()
Return the type of the HTML input element to generate: "checkbox" or "radio".