Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.tag
Class CrumbTrailTag  view CrumbTrailTag download CrumbTrailTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.apache.struts.taglib.html.BaseHandlerTag
              extended bycom.RuntimeCollective.webapps.tag.CrumbTrailTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class CrumbTrailTag
extends org.apache.struts.taglib.html.BaseHandlerTag

A custom JSP tag that adds the current page to the crumb trail and displays the result. Why not just hard-code the crumb trail into the jsp (or html)? This is OK for simple sites in which the same page is only accessed by a single path (i.e. which form a non-recurrent tree.) The advantage with this tag is that it can cope with more complex site graphs in which the same page can be access by multiple routes.

This tag takes two attributes:

Note The trail is only printed if it has more than one crumb.

Version:
$Id: CrumbTrailTag.java,v 1.12 2003/09/30 15:13:16 joe Exp $

Field Summary
protected  java.lang.String action
          The name of the action that handles the trail.
protected  java.lang.String delimiter
          The crumb delimiter.
protected  java.lang.String forward
          The forward for the current page.
protected  java.lang.String home
          Whether this page is a home page -- ie whether the crumb trail will be reset on this page.
protected  java.lang.String label
          The label for the current page.
protected  java.lang.String labelName
          The name of the bean that holds the label to display.
protected  java.lang.String labelProperty
          The property of the named bean that holds the label to display.
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, defaultLocale, doDisabled, doReadonly, indexed, messages, tabindex
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
CrumbTrailTag()
           
 
Method Summary
 int doStartTag()
          Default processing of the start tag returning EVAL_BODY_BUFFERED.
 java.lang.String getDelimiter()
          Get the crumb delimiter.
 java.lang.String getFormAction()
          Get the name of the action that handles the trail.
 java.lang.String getForward()
          Get the forward for the current page.
 java.lang.String getHome()
          Get whether this page is a home page -- ie whether the crumb trail will be reset on this page.
 java.lang.String getLabel()
          Get the label for the current page.
 java.lang.String getLabelName()
          Get the name of the bean that holds the label to display.
 java.lang.String getLabelProperty()
          Get the property of the named bean that holds the label to display.
 void release()
          Release any acquired resources.
 void setDelimiter(java.lang.String delimiter)
          Set the crumb delimiter.
 void setFormAction(java.lang.String action)
          Set the name of the action that handles the trail.
 void setForward(java.lang.String forward)
          Set the forward for the current page.
 void setHome(java.lang.String home)
          Set whether this page is a home page -- ie whether the crumb trail will be reset on this page.
 void setLabel(java.lang.String label)
          Set the label for the current page.
 void setLabelName(java.lang.String labelName)
          Set the name of the bean that holds the label to display.
 void setLabelProperty(java.lang.String labelProperty)
          Set the property of the named bean that holds the label to display.
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareAttribute, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

label

protected java.lang.String label
The label for the current page.


forward

protected java.lang.String forward
The forward for the current page.


delimiter

protected java.lang.String delimiter
The crumb delimiter.


action

protected java.lang.String action
The name of the action that handles the trail.


home

protected java.lang.String home
Whether this page is a home page -- ie whether the crumb trail will be reset on this page.


labelName

protected java.lang.String labelName
The name of the bean that holds the label to display.


labelProperty

protected java.lang.String labelProperty
The property of the named bean that holds the label to display.

Constructor Detail

CrumbTrailTag

public CrumbTrailTag()
Method Detail

getLabel

public java.lang.String getLabel()
Get the label for the current page.


setLabel

public void setLabel(java.lang.String label)
Set the label for the current page.


getForward

public java.lang.String getForward()
Get the forward for the current page.


setForward

public void setForward(java.lang.String forward)
Set the forward for the current page.


getDelimiter

public java.lang.String getDelimiter()
Get the crumb delimiter.


setDelimiter

public void setDelimiter(java.lang.String delimiter)
Set the crumb delimiter.


getFormAction

public java.lang.String getFormAction()
Get the name of the action that handles the trail.


setFormAction

public void setFormAction(java.lang.String action)
Set the name of the action that handles the trail.


getHome

public java.lang.String getHome()
Get whether this page is a home page -- ie whether the crumb trail will be reset on this page.


setHome

public void setHome(java.lang.String home)
Set whether this page is a home page -- ie whether the crumb trail will be reset on this page.


getLabelName

public java.lang.String getLabelName()
Get the name of the bean that holds the label to display.


setLabelName

public void setLabelName(java.lang.String labelName)
Set the name of the bean that holds the label to display.


getLabelProperty

public java.lang.String getLabelProperty()
Get the property of the named bean that holds the label to display.


setLabelProperty

public void setLabelProperty(java.lang.String labelProperty)
Set the property of the named bean that holds the label to display.


doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Description copied from class: javax.servlet.jsp.tagext.BodyTagSupport
Default processing of the start tag returning EVAL_BODY_BUFFERED.


release

public void release()
Description copied from class: org.apache.struts.taglib.html.BaseHandlerTag
Release any acquired resources.