Class BindErrorsTag
- 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.BindErrorsTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
,TryCatchFinally
public class BindErrorsTag extends HtmlEscapingAwareTag
JSP tag that evaluates content if there are binding errors for a certain bean. Exports an "errors" variable of typeErrors
for the given bean.- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
BindTag
,Errors
, Serialized Form
Field Summary
Fields Modifier and Type Field Description static String
ERRORS_VARIABLE_NAME
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
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
Constructors Constructor Description BindErrorsTag()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
void
doFinally()
protected int
doStartTagInternal()
Called by doStartTag to perform the actual work.Errors
getErrors()
Retrieve the Errors instance that this tag is currently bound to.String
getName()
Return the name of the bean that this tag checks.void
setName(String name)
Set the name of the bean that this tag should check.Methods inherited from class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
htmlEscape, isDefaultHtmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscape
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doStartTag, getRequestContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
Field Detail
ERRORS_VARIABLE_NAME
public static final String ERRORS_VARIABLE_NAME
- See Also:
- Constant Field Values
Constructor Detail
BindErrorsTag
public BindErrorsTag()
Method Detail
doStartTagInternal
protected final int doStartTagInternal() throws ServletException, JspException
Description copied from class:RequestContextAwareTag
Called by doStartTag to perform the actual work.- Specified by:
doStartTagInternal
in classRequestContextAwareTag
- Returns:
- same as TagSupport.doStartTag
- Throws:
ServletException
JspException
- See Also:
TagSupport.doStartTag()
doEndTag
public int doEndTag()
- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
getErrors
public final Errors getErrors()
Retrieve the Errors instance that this tag is currently bound to.Intended for cooperating nesting tags.
doFinally
public void doFinally()
- Specified by:
doFinally
in interfaceTryCatchFinally
- Overrides:
doFinally
in classRequestContextAwareTag