net.sourceforge.stripes.tag
Class UrlTag

java.lang.Object
  extended by net.sourceforge.stripes.tag.StripesTagSupport
      extended by net.sourceforge.stripes.tag.HtmlTagSupport
          extended by net.sourceforge.stripes.tag.LinkTagSupport
              extended by net.sourceforge.stripes.tag.UrlTag
All Implemented Interfaces:
BodyTag, DynamicAttributes, IterationTag, JspTag, Tag, ParameterizableTag

public class UrlTag
extends LinkTagSupport
implements BodyTag

A Stripes version of the <c:url/> tag that adds some Stripes specific parameters to the URL. Designed to generate URLs and either write them into the page or set them into one of the JSP scopes.

Cooperates with the Stripes ParamTag to accept any number of parameters that will be merged into the URL before rendering.

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

Field Summary
 
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport
pageContext, parentTag
 
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
UrlTag()
           
 
Method Summary
 int doAfterBody()
          Does nothing.
 int doEndTag()
          Generates the URL and either writes it into the page or sets it in the appropraite JSP scope.
 void doInitBody()
          Does nothing.
 int doStartTag()
          Does nothing.
 String getScope()
          Gets the name of scope to store the scoped variable specified by 'var' in.
 String getValue()
          Gets the URL as supplied on the page.
 String getVar()
          Gets the name of the scoped variable to store the URL in.
 void setScope(String scope)
          Sets the name of scope to store the scoped variable specified by 'var' in.
 void setValue(String value)
          Sets the URL as supplied on the page.
 void setVar(String var)
          Sets the name of the scoped variable to store the URL in.
 
Methods inherited from class net.sourceforge.stripes.tag.LinkTagSupport
addParameter, buildUrl, clearParameters, getAnchor, getBeanclass, getEvent, getParameters, getPreferredBaseUrl, getUrl, isAddSourcePage, isPrependContext, setAddSourcePage, setAnchor, setBeanclass, setEvent, setPrependContext, setUrl
 
Methods inherited from class net.sourceforge.stripes.tag.HtmlTagSupport
evaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, release, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTag
 
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.BodyTag
setBodyContent
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, release, setPageContext, setParent
 

Constructor Detail

UrlTag

public UrlTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Does nothing.

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

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:
Tag.SKIP_BODY in all cases.
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Generates the URL and either writes it into the page or sets it in the appropraite JSP scope.

Specified by:
doEndTag in interface Tag
Specified by:
doEndTag in class StripesTagSupport
Returns:
Tag.EVAL_PAGE in all cases.
Throws:
JspException - if the output stream cannot be written to.

getVar

public String getVar()
Gets the name of the scoped variable to store the URL in.


setVar

public void setVar(String var)
Sets the name of the scoped variable to store the URL in.


getScope

public String getScope()
Gets the name of scope to store the scoped variable specified by 'var' in.


setScope

public void setScope(String scope)
Sets the name of scope to store the scoped variable specified by 'var' in.


getValue

public String getValue()
Gets the URL as supplied on the page.


setValue

public void setValue(String value)
Sets the URL as supplied on the page.



? Copyright 2005-2006, Stripes Development Team.