com.taggercat.tags
Class PageNavigationTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.AbstractExpEvalTag
          extended by com.taggercat.tags.PageNavigationTag
All Implemented Interfaces:
com.taggercat.el.ELPropertyResolver, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class PageNavigationTag
extends AbstractExpEvalTag

This tag is used to create dynamic page navigation anchor tags.
The link is dynamic in the sense that it is enabled when its condition is true or it is for a known action, and the user has permission for that action.

NOTE: this tag generates code that calls the tc.pageNavigate javascript method.

Example:

 <tc:pageNavAnchor enabledCaption="Employees"
 disabledCaption="Have a Nice Day" formName="document.form1"
 responsePage="/Employees.jsp"
 condition="isUserInRole('Admin')" >
 

See Also:
Serialized Form
 

Field Summary
 
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
PageNavigationTag()
           
 
Method Summary
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Creates the page navigation tag, and sends it to the page.
 void setCondition(java.lang.String expression)
          Sets the condition expression when the Anchor is enabled.
 void setDisabledCaption(java.lang.String disabledCaption)
          Sets the caption when the action is not valid, and therefore disabled.
 void setDisabledStyleclass(java.lang.String disabledStyleclass)
          Sets the CSS Style class to use of the action is disabled.
 void setEnabledCaption(java.lang.String enabledCaption)
          Sets the caption when the action is valid, and therefore enabled.
 void setErrorPage(java.lang.String errorPage)
          Sets the resulting response page if there is an error condition.
 void setFormName(java.lang.String formName)
          Sets the form name to submit for the action.
 void setResponsePage(java.lang.String responsePage)
          Sets the resulting response page, usually the current page.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class com.taggercat.tags.AbstractExpEvalTag
getModel, resolveProperty, setScope, setValue, setVar
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageNavigationTag

public PageNavigationTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects.

All instance state associated with this instance must be reset.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class AbstractExpEvalTag
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Creates the page navigation tag, and sends it to the page.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class AbstractExpEvalTag
Throws:
javax.servlet.jsp.JspException
Returns:
SKIP_BODY

setCondition

public void setCondition(java.lang.String expression)
Sets the condition expression when the Anchor is enabled. The expression is evaluated by the expression evaluator.

Parameters:
expression - the condition expression

setDisabledCaption

public void setDisabledCaption(java.lang.String disabledCaption)
Sets the caption when the action is not valid, and therefore disabled. This attribute is optional, and if not specified then the action name is used.

Parameters:
disabledCaption - the caption to use when the link is disabled

setEnabledCaption

public void setEnabledCaption(java.lang.String enabledCaption)
Sets the caption when the action is valid, and therefore enabled. This attribute is optional, and if not specified then the action name is used.

Parameters:
enabledCaption - enabled caption

setErrorPage

public void setErrorPage(java.lang.String errorPage)
Sets the resulting response page if there is an error condition. This is usually the current page.

Parameters:
errorPage - the resulting response page if there is an error condition, usually the current page

setFormName

public void setFormName(java.lang.String formName)
Sets the form name to submit for the action.

Parameters:
formName - the form name

setResponsePage

public void setResponsePage(java.lang.String responsePage)
Sets the resulting response page, usually the current page.

Parameters:
responsePage - the resulting response page, usually the current page

setDisabledStyleclass

public void setDisabledStyleclass(java.lang.String disabledStyleclass)
Sets the CSS Style class to use of the action is disabled.

Parameters:
disabledStyleclass - the disabled style class

toString

public java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object