KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > servlet > jsp > jstl > core > LoopTag


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package javax.servlet.jsp.jstl.core;
18
19 import javax.servlet.jsp.tagext.Tag JavaDoc;
20
21 /**
22  * <p>JSTL allows developers to write custom iteration tags by
23  * implementing the LoopTag interface. This is not to be confused
24  * with <tt>javax.servlet.jsp.tagext.IterationTag</tt> as defined in JSP 1.2.
25  * LoopTag establishes a mechanism for iteration tags to be recognized
26  * and for type-safe implicit collaboration with custom subtags.
27  *
28  * <p>In most cases, it will not be necessary to implement this interface
29  * manually, for a base support class (<tt>LoopTagSupport</tt>) is provided
30  * to facilitate implementation.</p>
31  *
32  * @author Shawn Bayern
33  */

34
35 public interface LoopTag extends Tag JavaDoc {
36
37     /**
38      * Retrieves the current item in the iteration. Behaves
39      * idempotently; calling getCurrent() repeatedly should return the same
40      * Object until the iteration is advanced. (Specifically, calling
41      * getCurrent() does <b>not</b> advance the iteration.)
42      *
43      * @return the current item as an object
44      */

45     public Object JavaDoc getCurrent();
46
47     /**
48      * Retrieves a 'status' object to provide information about the
49      * current round of the iteration.
50      *
51      * @return The LoopTagStatus for the current <tt>LoopTag</tt>.
52      */

53     public LoopTagStatus getLoopStatus();
54 }
55
Popular Tags