net.sf.ewc.taglib
Class ForEachTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bynet.sf.ewc.taglib.EWCTag
              extended bynet.sf.ewc.taglib.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 EWCTag

ForEachTagiterates over all the collection items in the source, setting each one as the new evaluation context and repeating its content.

Author:
mballesteros
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.ewc.taglib.EWCTag
out, pageContext, parent, session
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id
 
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()
          Main constructor
 
Method Summary
 int doAfterBody()
           
 void doInitBody()
           
 int doStartTag()
           
 void setIndexName(java.lang.String indexName)
          Sets the index name to use when substituting parameters (defaults to "i")
 void setSrc(java.lang.String src)
          Sets the expression to the collection to iterate over
protected  java.lang.String substituteParentParameters(java.lang.String exp)
          Transforms the user expression, substituting the context parameters
 
Methods inherited from class net.sf.ewc.taglib.EWCTag
doEndTag, getComponentPropertyFullExpression, getComponentPropertyValue, getComposedExpression, getContextPath, getCtx, getCtx, getCtx, getCtxPath, getCtxPath, getCtxPath, getCtxStack, getCtxStack, getEvent, getEWCSession, getExpressionValue, getExpressionValue, getExpressionValueAsString, getExpressionValueAsString, getFullExpression, getIndexedExpression, getParent, getStack, getStack, peekCtx, peekCtx, popCtx, printAttribute, printBeginTag, printEndBeginTag, printEndTag, printEndTag, pushCtx, pushCtx, pushCtx, pushCtx, release, setPageContext, setParent
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getValue, getValues, removeValue, setId, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForEachTag

public ForEachTag()
Main constructor

Method Detail

setSrc

public void setSrc(java.lang.String src)
Sets the expression to the collection to iterate over

Parameters:
src - The expression

setIndexName

public void setIndexName(java.lang.String indexName)
Sets the index name to use when substituting parameters (defaults to "i")

Parameters:
indexName -

doStartTag

public int doStartTag()
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class EWCTag
Returns:

doInitBody

public void doInitBody()
                throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Returns:
How to follow processing
Throws:
javax.servlet.jsp.JspException

substituteParentParameters

protected java.lang.String substituteParentParameters(java.lang.String exp)
Transforms the user expression, substituting the context parameters

Overrides:
substituteParentParameters in class EWCTag
Returns:


Copyright © 2003-2004 SourceForge. All Rights Reserved.