类 NestedPathTag
- java.lang.Object
- javax.servlet.jsp.tagext.TagSupport
- org.springframework.web.servlet.tags.NestedPathTag
- 所有已实现的接口:
Serializable
,IterationTag
,JspTag
,Tag
,TryCatchFinally
public class NestedPathTag extends TagSupport implements TryCatchFinally
The
<nestedPath>
tag supports and assists with nested beans or bean properties in the model. Exports a "nestedPath" variable of type String in request scope, visible to the current page and also included pages, if any.The BindTag will auto-detect the current nested path and automatically prepend it to its own path to form a complete path to the bean or bean property.
This tag will also prepend any existing nested path that is currently set. Thus, you can nest multiple nested-path tags.
Attribute Summary Attribute Required? Runtime Expression? Description path true true Set the path that this tag should apply. E.g. 'customer' to allow bind paths like 'address.street' rather than 'customer.address.street'. - 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
- 序列化表格
字段概要
字段 修饰符和类型 字段 说明 static String
NESTED_PATH_VARIABLE_NAME
Name of the exposed variable within the scope of this tag: "nestedPath".从类继承的字段 javax.servlet.jsp.tagext.TagSupport
id, pageContext
从接口继承的字段 javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
从接口继承的字段 javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
构造器概要
构造器 构造器 说明 NestedPathTag()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
doCatch(Throwable throwable)
int
doEndTag()
Reset any previous nestedPath value.void
doFinally()
int
doStartTag()
String
getPath()
Return the path that this tag applies to.void
setPath(String path)
Set the path that this tag should apply.从类继承的方法 javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
字段详细资料
NESTED_PATH_VARIABLE_NAME
public static final String NESTED_PATH_VARIABLE_NAME
Name of the exposed variable within the scope of this tag: "nestedPath".- 另请参阅:
- 常量字段值
构造器详细资料
NestedPathTag
public NestedPathTag()
方法详细资料
setPath
public void setPath(@Nullable String path)
Set the path that this tag should apply.E.g. "customer" to allow bind paths like "address.street" rather than "customer.address.street".
doStartTag
public int doStartTag() throws JspException
- 指定者:
doStartTag
在接口中Tag
- 覆盖:
doStartTag
在类中TagSupport
- 抛出:
JspException
doEndTag
public int doEndTag()
Reset any previous nestedPath value.- 指定者:
doEndTag
在接口中Tag
- 覆盖:
doEndTag
在类中TagSupport
doCatch
public void doCatch(Throwable throwable) throws Throwable
- 指定者:
doCatch
在接口中TryCatchFinally
- 抛出:
Throwable
doFinally
public void doFinally()
- 指定者:
doFinally
在接口中TryCatchFinally