FileDocCategorySizeDatePackage
ClassicSimpleLoopTag.javaAPI DocExample1342Tue Feb 28 11:34:06 GMT 2006com.ora.jsp.tags.xmp

ClassicSimpleLoopTag

public class ClassicSimpleLoopTag extends TagSupport

Fields Summary
private Iterator
iterator
private Collection
items
private String
var
Constructors Summary
Methods Summary
public intdoAfterBody()
Makes the next element available to the body in a variable with the name specified by the loopId attribute, or returns SKIP_BODY if all elements have been processed.

        if (iterator.hasNext()) {
            pageContext.setAttribute(var, iterator.next());
	    return EVAL_BODY_AGAIN;
        }
        else {
	    return SKIP_BODY;
        }
    
public intdoStartTag()

	iterator = items.iterator();
        if (iterator.hasNext()) {
            pageContext.setAttribute(var, iterator.next());
	    return EVAL_BODY_INCLUDE;
        }
        else {
	    return SKIP_BODY;
        }
    
public voidrelease()
Releases all instance variables.

	iterator = null;
	items = null;
	var = null;
        super.release();
    
public voidsetItems(java.util.Collection items)

        this.items = items;
    
public voidsetVar(java.lang.String var)

        this.var = var;