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

Quick Search    Search Deep

com.amarda.framework.taglib
Class RowTag  view RowTag download RowTag.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.amarda.framework.taglib.RowTag
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 RowTag
extends org.apache.struts.taglib.html.BaseHandlerTag

This tag generates table rows (i.e. <tr>....</tr> elements) with the background color set differently for alternating odd and even rows. This tag only operates properly if embedded in an IterateTag.

The following parameters can be specified for this Tag:

Additionally this tag inherits the Event Handler and Style attributes from the BaseHandlerTag which can also be specified

Version:
1.0

Field Summary
protected  java.lang.String align
          Alignment of the table row
protected  java.lang.String evenColor
          Color of Even rows in a table
protected  java.lang.String evenStyleClass
          Style Class of Even rows in a table
protected  java.lang.String oddColor
          Color of Odd rows in a table
protected  java.lang.String oddStyleClass
          StyleClass of Odd rows in a table
protected static java.lang.String QUOTE
           
protected  java.lang.String valign
          Vertical Alignment of the table row
 
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
RowTag()
           
 
Method Summary
 int doEndTag()
          End of Tag Processing
 int doStartTag()
          Start of Tag processing
 java.lang.String getAlign()
          Return the Alignment
 java.lang.String getEvenColor()
          Return the color of Even rows
 java.lang.String getEvenStyleClass()
          Return the Style Class of Even rows
 java.lang.String getOddColor()
          Return the color of Odd rows
 java.lang.String getOddStyleClass()
          Return the Style Class of Odd rows
protected  int getRowNumber()
          Determine the Row Number - from the IterateTag
 java.lang.String getValign()
          Return the Vertical Alignment
protected  java.lang.String prepareAttribute(java.lang.String attribute, java.lang.String value)
          Format attribute="value" from the specified attribute & value
protected  void prepareAttributes(java.lang.StringBuffer buffer)
          Prepare the attributes of the HTML element
protected  java.lang.String prepareBgcolor(boolean evenNumber)
          Format the bgcolor attribute depending on whether the row is odd or even.
protected  java.lang.String prepareClass(boolean evenNumber)
          Format the Style sheet class attribute depending on whether the row is odd or even.
 void release()
          Release resources after Tag processing has finished.
 void setAlign(java.lang.String align)
          Set the Alignment
 void setEvenColor(java.lang.String color)
          Set the color of Even rows
 void setEvenStyleClass(java.lang.String styleClass)
          Set the styleClass of Even rows
 void setOddColor(java.lang.String color)
          Set the color of Odd rows
 void setOddStyleClass(java.lang.String styleClass)
          Set the Style Class of Odd rows
 void setValign(java.lang.String valign)
          Set the Vertical Alignment
 
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, 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

QUOTE

protected static final java.lang.String QUOTE
See Also:
Constant Field Values

oddColor

protected java.lang.String oddColor
Color of Odd rows in a table


evenColor

protected java.lang.String evenColor
Color of Even rows in a table


oddStyleClass

protected java.lang.String oddStyleClass
StyleClass of Odd rows in a table


evenStyleClass

protected java.lang.String evenStyleClass
Style Class of Even rows in a table


align

protected java.lang.String align
Alignment of the table row


valign

protected java.lang.String valign
Vertical Alignment of the table row

Constructor Detail

RowTag

public RowTag()
Method Detail

getOddColor

public java.lang.String getOddColor()
Return the color of Odd rows


setOddColor

public void setOddColor(java.lang.String color)
Set the color of Odd rows


getEvenColor

public java.lang.String getEvenColor()
Return the color of Even rows


setEvenColor

public void setEvenColor(java.lang.String color)
Set the color of Even rows


getOddStyleClass

public java.lang.String getOddStyleClass()
Return the Style Class of Odd rows


setOddStyleClass

public void setOddStyleClass(java.lang.String styleClass)
Set the Style Class of Odd rows


getEvenStyleClass

public java.lang.String getEvenStyleClass()
Return the Style Class of Even rows


setEvenStyleClass

public void setEvenStyleClass(java.lang.String styleClass)
Set the styleClass of Even rows


getAlign

public java.lang.String getAlign()
Return the Alignment


setAlign

public void setAlign(java.lang.String align)
Set the Alignment


getValign

public java.lang.String getValign()
Return the Vertical Alignment


setValign

public void setValign(java.lang.String valign)
Set the Vertical Alignment


doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Start of Tag processing


doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
End of Tag Processing


prepareAttributes

protected void prepareAttributes(java.lang.StringBuffer buffer)
Prepare the attributes of the HTML element


prepareAttribute

protected java.lang.String prepareAttribute(java.lang.String attribute,
                                            java.lang.String value)
Format attribute="value" from the specified attribute & value


prepareBgcolor

protected java.lang.String prepareBgcolor(boolean evenNumber)
Format the bgcolor attribute depending on whether the row is odd or even.


prepareClass

protected java.lang.String prepareClass(boolean evenNumber)
Format the Style sheet class attribute depending on whether the row is odd or even.


getRowNumber

protected int getRowNumber()
Determine the Row Number - from the IterateTag


release

public void release()
Release resources after Tag processing has finished.