FileDocCategorySizeDatePackage
EvenTag.javaAPI DocGlassfish v2 API2913Sat May 05 19:17:12 BST 2007org.apache.taglibs.standard.examples.taglib

EvenTag

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

Tag handler for <odd>

author
Pierre Delisle
version
$Revision: 1.3 $ $Date: 2007/05/06 02:17:11 $

Fields Summary
Constructors Summary
Methods Summary
public intdoStartTag()

        LoopTag iteratorTag = (LoopTag)findAncestorWithClass(
        this, LoopTag.class);
        if (iteratorTag == null) {
            throw new JspTagException("<even> must be nested within a LoopTag");
        }
        
        int count = iteratorTag.getLoopStatus().getCount();
        return (count % 2 == 0) ? EVAL_BODY_INCLUDE : SKIP_BODY;