com.ivata.mask.web.tag.util
Class ForEachTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.ivata.mask.web.tag.util.ForEachTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class ForEachTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Loop increasing a counter nCounter until it reaches to (inclusive).

Since:
ivata masks 0.5 (2001-12-12)
Version:
$Revision: 1.2 $ TODO: This class is a temporary workaround because we had problems with the JSTL class.
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
Serialized Form

Field Summary
 
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
ForEachTag()
           
 
Method Summary
 int doAfterBody()
          Refer to IterationTag#doAfterBody.
 int doStartTag()
          Refer to Tag#doStartTag.
 java.lang.String getVar()
          Get the value of the counter.
 void setBegin(int value)
          Sets the first value of the loop counter.
 void setEnd(int value)
          Sets the final value of the loop counter, inclusive.
 void setStep(int value)
          Sets the increment by which the counter is increased after each loop.
 void setVar(java.lang.String value)
          Set the current value of the counter.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag, doInitBody, getBodyContent, getPreviousOut, release, 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
 

Constructor Detail

ForEachTag

public ForEachTag()
Method Detail

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Refer to IterationTag#doAfterBody.

Returns:
Refer to IterationTag#doAfterBody.
Throws:
javax.servlet.jsp.JspException - Refer to IterationTag#doAfterBody.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Refer to Tag#doStartTag.

Returns:
Refer to Tag#doStartTag.
Throws:
javax.servlet.jsp.JspException - Refer to Tag#doStartTag.

getVar

public final java.lang.String getVar()
Get the value of the counter.

Returns:
current counter value.

setBegin

public final void setBegin(int value)
Sets the first value of the loop counter.

Parameters:
value - the value the counter should start at.

setEnd

public final void setEnd(int value)
Sets the final value of the loop counter, inclusive.

Parameters:
value - final value of the loop counter, inclusive.

setStep

public final void setStep(int value)
Sets the increment by which the counter is increased after each loop.

Parameters:
value - increment by which the counter is increased after each loop.

setVar

public final void setVar(java.lang.String value)
Set the current value of the counter.

Parameters:
value - new value of counter.


Copyright © 2001-2005 ivata limited. All Rights Reserved.