org.apache.struts.taglib.bean

Class SizeTag

public class SizeTag extends TagSupport

Define a scripting variable that will contain the number of elements found in a specified array, Collection, or Map.

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected Objectcollection
The actual collection to be counted.
protected Stringid
The name of the scripting variable that will be exposed as a page scope attribute.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringname
The name of the bean owning the property to be counted.
protected Stringproperty
The name of the property to be retrieved.
protected Stringscope
The scope within which to search for the specified bean.
Method Summary
intdoStartTag()
Retrieve the required property and expose it as a scripting variable.
ObjectgetCollection()
StringgetId()
StringgetName()
StringgetProperty()
StringgetScope()
voidrelease()
Release all allocated resources.
voidsetCollection(Object collection)
voidsetId(String id)
voidsetName(String name)
voidsetProperty(String property)
voidsetScope(String scope)

Field Detail

collection

protected Object collection
The actual collection to be counted.

id

protected String id
The name of the scripting variable that will be exposed as a page scope attribute.

messages

protected static MessageResources messages
The message resources for this package.

name

protected String name
The name of the bean owning the property to be counted.

property

protected String property
The name of the property to be retrieved.

scope

protected String scope
The scope within which to search for the specified bean.

Method Detail

doStartTag

public int doStartTag()
Retrieve the required property and expose it as a scripting variable.

Throws: JspException if a JSP exception has occurred

getCollection

public Object getCollection()

getId

public String getId()

getName

public String getName()

getProperty

public String getProperty()

getScope

public String getScope()

release

public void release()
Release all allocated resources.

setCollection

public void setCollection(Object collection)

setId

public void setId(String id)

setName

public void setName(String name)

setProperty

public void setProperty(String property)

setScope

public void setScope(String scope)
Copyright B) 2000-2008 - The Apache Software Foundation