com.taggercat.tags
Class RowStyleTag

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

public class RowStyleTag
extends javax.servlet.jsp.tagext.TagSupport

This tags selects the CSS style to use for the current tcEntity displayed in a repeating region (typically a table). This tag is only valid inside a RepeatedRegion. The repeated region is always associated with a data source. If the current tcEntity is an evenly numbered row, then the even value (CSS Style etc.) is printed. Otherwise, the odd value is printed.
If the current style is specified, and the tcEntity is the "current" tcEntity then the current style is printed; taking precedence over the other styles.

The attributes:

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
RowStyleTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Prints the even style value if the tcEntity is an even numbered tcEntity, otherwise prints the odd style value.
 void setCurrent(java.lang.String currentStyle)
          Sets the style to be used in current rows.
 void setEven(java.lang.String evenStyle)
          Sets the style to be used in Even tcEntity numbers.
 void setOdd(java.lang.String oddStyle)
          Sets the style to be used in odd tcEntity numbers.
 java.lang.String toString()
          Returns the String representation of the tag.
 
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

RowStyleTag

public RowStyleTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Prints the even style value if the tcEntity is an even numbered tcEntity, otherwise prints the odd style value.

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

setCurrent

public void setCurrent(java.lang.String currentStyle)
Sets the style to be used in current rows.

Parameters:
currentStyle - the currentStyle value

setEven

public void setEven(java.lang.String evenStyle)
Sets the style to be used in Even tcEntity numbers.

Parameters:
evenStyle - the evenStyle value

setOdd

public void setOdd(java.lang.String oddStyle)
Sets the style to be used in odd tcEntity numbers.

Parameters:
oddStyle - the oddStyle value, or the value used for odd numbered rows

toString

public java.lang.String toString()
Returns the String representation of the tag.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of the tag