org.springframework.web.servlet.tags
Class NestedPathTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.springframework.web.servlet.tags.NestedPathTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class NestedPathTag
extends javax.servlet.jsp.tagext.TagSupport

Nested path tag, to support and assist with nested beans or bean properties. Exports a "nestedPath" variable of type String.

The BindTag will auto-detect the 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 nested multiple nested path tags.

Since:
28.07.2004
Author:
Seth Ladd, Juergen Hoeller
See Also:
Serialized Form

Field Summary
static java.lang.String NESTED_PATH_VARIABLE_NAME
          Name of the exposed variable within the scope of this tag: "nestedPath".
 
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
NestedPathTag()
           
 
Method Summary
 int doEndTag()
          Reset any previous nestedPath value.
 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.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NESTED_PATH_VARIABLE_NAME

public static final java.lang.String NESTED_PATH_VARIABLE_NAME
Name of the exposed variable within the scope of this tag: "nestedPath".

See Also:
Constant Field Values
Constructor Detail

NestedPathTag

public NestedPathTag()
Method Detail

setPath

public void setPath(java.lang.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".

See Also:
BindTag.setPath(java.lang.String)

getPath

public java.lang.String getPath()
Return the path that this tag applies to.


doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
Reset any previous nestedPath value.



Copyright (C) 2003-2004 The Spring Framework Project.