Class NestedPathTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.NestedPathTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.TryCatchFinally, Serializable
public class NestedPathTag
extends jakarta.servlet.jsp.tagext.TagSupport
implements jakarta.servlet.jsp.tagext.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 | Required? | Runtime Expression? | Description |
|---|---|---|---|
| path | true | true | Set the path that this tag should apply. For example, 'customer' to allow bind paths like 'address.street' rather than 'customer.address.street'. |
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the exposed variable within the scope of this tag: "nestedPath".Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
NESTED_PATH_VARIABLE_NAME
Name of the exposed variable within the scope of this tag: "nestedPath".- See Also:
-
-
Constructor Details
-
NestedPathTag
public NestedPathTag()
-
-
Method Details
-
setPath
-
getPath
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspException- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
doEndTag
public int doEndTag()Reset any previous nestedPath value.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport
-
doCatch
-
doFinally
public void doFinally()- Specified by:
doFinallyin interfacejakarta.servlet.jsp.tagext.TryCatchFinally
-