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 | 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'. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NESTED_PATH_VARIABLE_NAME
Name of the exposed variable within the scope of this tag: "nestedPath".
|
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
NestedPathTag() |
Modifier and Type | Method and Description |
---|---|
void |
doCatch(java.lang.Throwable throwable) |
int |
doEndTag()
Reset any previous nestedPath value.
|
void |
doFinally() |
int |
doStartTag() |
java.lang.String |
getPath()
Return the path that this tag applies to.
|
void |
setPath(java.lang.String path)
Set the path that this tag should apply.
|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
public static final java.lang.String NESTED_PATH_VARIABLE_NAME
public void setPath(@Nullable java.lang.String path)
E.g. "customer" to allow bind paths like "address.street" rather than "customer.address.street".
BindTag.setPath(java.lang.String)
@Nullable public java.lang.String getPath()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public int doEndTag()
doEndTag
in interface Tag
doEndTag
in class TagSupport
public void doCatch(java.lang.Throwable throwable) throws java.lang.Throwable
doCatch
in interface TryCatchFinally
java.lang.Throwable
public void doFinally()
doFinally
in interface TryCatchFinally