Version 4.10.0

Class AlternatingRow

  extended by SimpleTagSupport
      extended by hirondelle.web4j.ui.tag.TagHelper
          extended by hirondelle.web4j.ui.tag.AlternatingRow
All Implemented Interfaces:
JspTag, SimpleTag

public final class AlternatingRow
extends TagHelper

Generate table rows which alternate in appearance, to increase legibility.

The body of this tag contains one or more TR tags. Each TR tag contains a class attribute, specifying a Cascading Style Sheet class. This tag will simply remove or update the class attribute for alternate occurrences of each TR tag found in its body.

If the optional altClass attribute is specified, then the class attribute of each TR is updated to an alternate value, instead of being removed.

Constructor Summary
Method Summary
protected  String getEmittedText(String aOriginalBody)
          For each TR tag found in the body, remove or update the class attribute.
 void setAltClass(String aAltClass)
          Optional name of a CSS class.
Methods inherited from class hirondelle.web4j.ui.tag.TagHelper
checkForContent, crossCheckAttributes, doTag, getPageContext, getPageName, getRequest, getResponse
Methods inherited from class SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AlternatingRow()
Method Detail


public void setAltClass(String aAltClass)
Optional name of a CSS class.

The CSS class for each TR tag found in the body of this tag will be updated to this value, for alternating rows. If this item is not specified, then the TR's class attribute is simply removed instead of updated.

aAltClass - must have content.


protected String getEmittedText(String aOriginalBody)
                         throws JspException,
For each TR tag found in the body, remove or update the class attribute.

If no altClass is specified, then the class attribute is simply removed entirely. Otherwise, it updated to the altClass value.

Specified by:
getEmittedText in class TagHelper
aOriginalBody - is the evaluated body of this tag. If there is no body, or if the body is present but empty, then it is null.
the text to display in the resulting web page.

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.