net.sourceforge.stripes.tag
Class LinkTag

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.LinkTag
All Implemented Interfaces:
BodyTag, DynamicAttributes, IterationTag, JspTag, Tag, ParameterizableTag

public class LinkTag
extends LinkTagSupport
implements BodyTag

Tag for generating links to pages or ActionBeans within a Stripes application. Provides basic services such as including the context path at the start of the href URL (only when the URL starts with a '/' and does not contain the context path already), and including a parameter to name the source page from which the link came. Also provides the ability to add complex parameters to the URL through the use of nested Param tags.

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
LinkTag()
           
 
Method Summary
 int doAfterBody()
          Does nothing.
 int doEndTag()
          Prepends the context to the href attribute if necessary, and then folds all the registered parameters into the URL.
 void doInitBody()
          Does nothing.
 int doStartTag()
          Does nothing.
 String getCharset()
           
 String getCoords()
           
 String getHref()
          Pass through to LinkTagSupport.getUrl().
 String getHreflang()
           
 String getName()
           
 String getRel()
           
 String getRev()
           
 String getShape()
           
 String getTarget()
           
 String getType()
           
 void setCharset(String charset)
           
 void setCoords(String coords)
           
 void setHref(String href)
          Pass through to LinkTagSupport.setUrl(String).
 void setHreflang(String hreflang)
           
 void setName(String name)
           
 void setRel(String rel)
           
 void setRev(String rev)
           
 void setShape(String shape)
           
 void setTarget(String target)
           
 void setType(String type)
           
 
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

LinkTag

public LinkTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Does nothing.

Specified by:
doStartTag in interface Tag
Specified by:
doStartTag in class StripesTagSupport
Returns:
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:
SKIP_BODY in all cases
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Prepends the context to the href attribute if necessary, and then folds all the registered parameters into the URL.

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

setHref

public void setHref(String href)
Pass through to LinkTagSupport.setUrl(String).


getHref

public String getHref()
Pass through to LinkTagSupport.getUrl().


setCharset

public void setCharset(String charset)

getCharset

public String getCharset()

setCoords

public void setCoords(String coords)

getCoords

public String getCoords()

setHreflang

public void setHreflang(String hreflang)

getHreflang

public String getHreflang()

setName

public void setName(String name)

getName

public String getName()

setRel

public void setRel(String rel)

getRel

public String getRel()

setRev

public void setRev(String rev)

getRev

public String getRev()

setShape

public void setShape(String shape)

getShape

public String getShape()

setTarget

public void setTarget(String target)

getTarget

public String getTarget()

setType

public void setType(String type)

getType

public String getType()


? Copyright 2005-2006, Stripes Development Team.