org.apache.struts.taglib.logic
クラス IterateTag

java.lang.Object
  拡張javax.servlet.jsp.tagext.TagSupport
      拡張javax.servlet.jsp.tagext.BodyTagSupport
          拡張org.apache.struts.taglib.logic.IterateTag
すべての実装インタフェース:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

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

Custom tag that iterates the elements of a collection, which can be either an attribute or the property of an attribute. The collection can be any of the following: an array of objects, an Enumeration, an Iterator, a Collection (which includes Lists, Sets and Vectors), or a Map (which includes Hashtables) whose elements will be iterated over.

バージョン:
$Revision: 1.1.1.1 $ $Date: 2003/03/11 13:38:38 $
作成者:
Craig R. McClanahan
関連項目:
直列化された形式

フィールドの概要
protected  java.lang.Object collection
          The collection over which we will be iterating.
protected  java.lang.String id
          The name of the scripting variable to be exposed.
protected  java.lang.String indexId
          The name of the scripting variable to be exposed as the current index.
protected  java.util.Iterator iterator
          Iterator of the elements of this collection, while we are actually running.
protected  java.lang.String length
          The length value or attribute name (<=0 means no limit).
protected  int lengthCount
          The number of elements we have already rendered.
protected  int lengthValue
          The actual length value (calculated in the start tag).
protected static MessageResources messages
          The message resources for this package.
protected  java.lang.String name
          The name of the collection or owning bean.
protected  java.lang.String offset
          The starting offset (zero relative).
protected  int offsetValue
          The actual offset value (calculated in the start tag).
protected  java.lang.String property
          The property name containing the collection.
protected  java.lang.String scope
          The scope of the bean specified by the name property, if any.
protected  boolean started
          Has this tag instance been started?
protected  java.lang.String type
          The Java class of each exposed element of the collection.
 
クラス javax.servlet.jsp.tagext.BodyTagSupport から継承したフィールド
bodyContent
 
クラス javax.servlet.jsp.tagext.TagSupport から継承したフィールド
pageContext
 
インタフェース javax.servlet.jsp.tagext.BodyTag から継承したフィールド
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
インタフェース javax.servlet.jsp.tagext.IterationTag から継承したフィールド
EVAL_BODY_AGAIN
 
インタフェース javax.servlet.jsp.tagext.Tag から継承したフィールド
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
コンストラクタの概要
IterateTag()
           
 
メソッドの概要
 int doAfterBody()
          Make the next collection element available and loop, or finish the iterations if there are no more elements.
 int doEndTag()
          Clean up after processing this enumeration.
 int doStartTag()
          Construct an iterator for the specified collection, and begin looping through the body once per element.
 java.lang.Object getCollection()
           
 java.lang.String getId()
           
 int getIndex()
          Return the zero-relative index of the current iteration through the loop.
 java.lang.String getIndexId()
           
 java.lang.String getLength()
           
 java.lang.String getName()
           
 java.lang.String getOffset()
           
 java.lang.String getProperty()
           
 java.lang.String getScope()
           
 java.lang.String getType()
           
 void release()
          Release all allocated resources.
 void setCollection(java.lang.Object collection)
           
 void setId(java.lang.String id)
           
 void setIndexId(java.lang.String indexId)
           
 void setLength(java.lang.String length)
           
 void setName(java.lang.String name)
           
 void setOffset(java.lang.String offset)
           
 void setProperty(java.lang.String property)
           
 void setScope(java.lang.String scope)
           
 void setType(java.lang.String type)
           
 
クラス javax.servlet.jsp.tagext.BodyTagSupport から継承したメソッド
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
クラス javax.servlet.jsp.tagext.TagSupport から継承したメソッド
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.servlet.jsp.tagext.BodyTag から継承したメソッド
 
インタフェース javax.servlet.jsp.tagext.Tag から継承したメソッド
getParent, setPageContext, setParent
 

フィールドの詳細

iterator

protected java.util.Iterator iterator
Iterator of the elements of this collection, while we are actually running.


lengthCount

protected int lengthCount
The number of elements we have already rendered.


lengthValue

protected int lengthValue
The actual length value (calculated in the start tag).


messages

protected static MessageResources messages
The message resources for this package.


offsetValue

protected int offsetValue
The actual offset value (calculated in the start tag).


started

protected boolean started
Has this tag instance been started?


collection

protected java.lang.Object collection
The collection over which we will be iterating.


id

protected java.lang.String id
The name of the scripting variable to be exposed.


indexId

protected java.lang.String indexId
The name of the scripting variable to be exposed as the current index.


length

protected java.lang.String length
The length value or attribute name (<=0 means no limit).


name

protected java.lang.String name
The name of the collection or owning bean.


offset

protected java.lang.String offset
The starting offset (zero relative).


property

protected java.lang.String property
The property name containing the collection.


scope

protected java.lang.String scope
The scope of the bean specified by the name property, if any.


type

protected java.lang.String type
The Java class of each exposed element of the collection.

コンストラクタの詳細

IterateTag

public IterateTag()
メソッドの詳細

getCollection

public java.lang.Object getCollection()

setCollection

public void setCollection(java.lang.Object collection)

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getIndex

public int getIndex()

Return the zero-relative index of the current iteration through the loop. If you specify an offset, the first iteration through the loop will have that value; otherwise, the first iteration will return zero.

This property is read-only, and gives nested custom tags access to this information. Therefore, it is only valid in between calls to doStartTag() and doEndTag().


getIndexId

public java.lang.String getIndexId()

setIndexId

public void setIndexId(java.lang.String indexId)

getLength

public java.lang.String getLength()

setLength

public void setLength(java.lang.String length)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getOffset

public java.lang.String getOffset()

setOffset

public void setOffset(java.lang.String offset)

getProperty

public java.lang.String getProperty()

setProperty

public void setProperty(java.lang.String property)

getScope

public java.lang.String getScope()

setScope

public void setScope(java.lang.String scope)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Construct an iterator for the specified collection, and begin looping through the body once per element.

例外:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Make the next collection element available and loop, or finish the iterations if there are no more elements.

例外:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Clean up after processing this enumeration.

例外:
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release all allocated resources.



このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2002 - Apache Software Foundation