com.taggercat.tags
Class DataSourceNavigationTag

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

public class DataSourceNavigationTag
extends AbstractCommonAttrsTag

This tag is used to create data source navigation hyperlinks or buttons. The link is dynamic in the sense that it is enabled when the action is valid. Otherwise, only the action text is returned ( not an href ). For example, "Go Next" will be a link when there are more rows in the result set, otherwise, "Go Next" is simply static text.

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
DataSourceNavigationTag()
           
 
Method Summary
 int doEndTag()
          Resets the tags internal state.
 int doStartTag()
          Creates and send the data source navigation tag to the page.
 java.lang.String getDisabledStyleclass()
          Gets the disabled caption style.
 void setAction(java.lang.String action)
          Sets the action name.
 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.
 java.lang.String toString()
           
 
Methods inherited from class com.taggercat.tags.AbstractCommonAttrsTag
setDsn, setErrorPage, setFormName, setResponsePage
 
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

DataSourceNavigationTag

public DataSourceNavigationTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Resets the tags internal state.

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

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Creates and send the data source navigation tag to the page.

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

setAction

public void setAction(java.lang.String action)
Sets the action name.

Parameters:
action - The action name, ( not case sensitive ).
It must be one of: Constants.STANDARD_ACTION_GO_FIRST, Constants.STANDARD_ACTION_GO_PREVIOUS, Constants.STANDARD_ACTION_GO_NEXT, Constants.STANDARD_ACTION_GO_LAST

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 disabled caption

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 - the enabled caption

getDisabledStyleclass

public java.lang.String getDisabledStyleclass()
Gets the disabled caption style.

Returns:
the disabled CSS style class

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()
Overrides:
toString in class AbstractCommonAttrsTag