net.sourceforge.stripes.tag
Class ParamTag

java.lang.Object
  extended by net.sourceforge.stripes.tag.ParamTag
All Implemented Interfaces:
BodyTag, IterationTag, JspTag, Tag

public class ParamTag
extends Object
implements BodyTag

Used to supply parameters when nested inside tags that implement ParameterizableTag. The value is either obtained from the value attribute, or if that is not present, then the body of the tag.

Once the value has been established the parent tag is looked for, and the parameter is handed over to it.

Primarily used by the LinkTag and UrlTag.

Since:
Stripes 1.4
Author:
Tim Fennell
See Also:
ParamTag

Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
ParamTag()
           
 
Method Summary
 int doAfterBody()
          Does nothing.
 int doEndTag()
          Figures out what to use as the value, and then finds the parent link and adds the parameter.
 void doInitBody()
          Does nothing.
 int doStartTag()
          Does nothing.
 String getName()
          Gets the name of the parameter(s) that will be added to the URL.
 PageContext getPageContext()
           
 Tag getParent()
          Required spec method to allow others to access the parent of the tag.
 Object getValue()
          Gets the value attribute, as set with setValue().
 void release()
          Does nothing.
 void setBodyContent(BodyContent bodyContent)
          Used by the container to set the contents of the body of the tag.
 void setName(String name)
          Sets the name of the parameter(s) that will be added to the URL.
 void setPageContext(PageContext pageContext)
          Used by the container to set the page context for the tag.
 void setParent(Tag tag)
          Used by the container to provide the tag with access to it's parent tag on the page.
 void setValue(Object value)
          Sets the value of the parameter(s) to be added to the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamTag

public ParamTag()
Method Detail

setValue

public void setValue(Object value)
Sets the value of the parameter(s) to be added to the URL.


getValue

public Object getValue()
Gets the value attribute, as set with setValue().


setName

public void setName(String name)
Sets the name of the parameter(s) that will be added to the URL.


getName

public String getName()
Gets the name of the parameter(s) that will be added to the URL.


setBodyContent

public void setBodyContent(BodyContent bodyContent)
Used by the container to set the contents of the body of the tag.

Specified by:
setBodyContent in interface BodyTag

setPageContext

public void setPageContext(PageContext pageContext)
Used by the container to set the page context for the tag.

Specified by:
setPageContext in interface Tag

setParent

public void setParent(Tag tag)
Used by the container to provide the tag with access to it's parent tag on the page.

Specified by:
setParent in interface Tag

getParent

public Tag getParent()
Required spec method to allow others to access the parent of the tag.

Specified by:
getParent in interface Tag

doInitBody

public void doInitBody()
                throws JspException
Does nothing.

Specified by:
doInitBody in interface BodyTag
Throws:
JspException

doAfterBody

public int doAfterBody()
                throws JspException
Does nothing.

Specified by:
doAfterBody in interface IterationTag
Returns:
SKIP_BODY in all cases.
Throws:
JspException

doStartTag

public int doStartTag()
               throws JspException
Does nothing.

Specified by:
doStartTag in interface Tag
Returns:
EVAL_BODY_BUFFERED in all cases.
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Figures out what to use as the value, and then finds the parent link and adds the parameter.

Specified by:
doEndTag in interface Tag
Returns:
EVAL_PAGE in all cases.
Throws:
JspException

release

public void release()
Does nothing.

Specified by:
release in interface Tag

getPageContext

public PageContext getPageContext()


? Copyright 2005-2006, Stripes Development Team.