org.apache.struts.taglib
クラス EnumerateTag

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

public final class EnumerateTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Custom tag that enumerates the elements of a collection, which can be either an attribute or the property of an attribute. The collection can be an Enumeration, a Vector, or an array of objects.

FIXME - Should support Java2 collection classes as well!

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

フィールドの概要
private  java.lang.Object collection
          The collection over which we will be iterating.
private  java.util.Enumeration enumeration
          Enumeration of the elements of this collection.
private  java.lang.String id
          The name of the scripting variable to be exposed.
private  java.lang.String length
          The length value or attribute name (<=0 means no limit).
private  int lengthCount
          The number of elements we have already rendered.
private  int lengthValue
          The actual length value (calculated in the start tag).
protected static MessageResources messages
          The message resources for this package.
private  java.lang.String name
          The name of the collection or owning bean.
private  java.lang.String offset
          The starting offset (zero relative).
private  int offsetValue
          The actual offset value (calculated in the start tag).
private  java.lang.String property
          The property name containing 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
 
コンストラクタの概要
EnumerateTag()
           
 
メソッドの概要
 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 enumeration for the specified collection, and begin looping through the body once per element.
 java.lang.Object getCollection()
          Return the collection over which we will be enumerating.
 java.lang.String getId()
          Return the name of the scripting variable.
 java.lang.String getLength()
          Return the length.
 java.lang.String getName()
          Return the name of the collection or owning bean.
 java.lang.String getOffset()
          Return the offset.
 java.lang.String getProperty()
          Return the property name.
 void release()
          Release any acquired resources.
 void setCollection(java.lang.Object collection)
          Set the collection over which we will be enumerating.
 void setId(java.lang.String id)
          Set the name of the scripting variable.
 void setLength(java.lang.String length)
          Set the length.
 void setName(java.lang.String name)
          Set the name of the collection or owning bean.
 void setOffset(java.lang.String offset)
          Set the offset.
 void setProperty(java.lang.String property)
          Set the property name.
 
クラス 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
 

フィールドの詳細

collection

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


enumeration

private java.util.Enumeration enumeration
Enumeration of the elements of this collection.


id

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


length

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


lengthCount

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


lengthValue

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


messages

protected static MessageResources messages
The message resources for this package.


name

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


offset

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


offsetValue

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


property

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

コンストラクタの詳細

EnumerateTag

public EnumerateTag()
メソッドの詳細

getCollection

public java.lang.Object getCollection()
Return the collection over which we will be enumerating.


setCollection

public void setCollection(java.lang.Object collection)
Set the collection over which we will be enumerating.

パラメータ:
collection - The new collection

getId

public java.lang.String getId()
Return the name of the scripting variable.


setId

public void setId(java.lang.String id)
Set the name of the scripting variable.

パラメータ:
id - The new name of the scripting variable

getLength

public java.lang.String getLength()
Return the length.


setLength

public void setLength(java.lang.String length)
Set the length.

パラメータ:
length - The new length

getName

public java.lang.String getName()
Return the name of the collection or owning bean.


setName

public void setName(java.lang.String name)
Set the name of the collection or owning bean.

パラメータ:
name - The new name

getOffset

public java.lang.String getOffset()
Return the offset.


setOffset

public void setOffset(java.lang.String offset)
Set the offset.

パラメータ:
offset - The new offset

getProperty

public java.lang.String getProperty()
Return the property name.


setProperty

public void setProperty(java.lang.String property)
Set the property name.

パラメータ:
property - The property name

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Construct an enumeration 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 any acquired resources.



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