Home

This Chapter
-Chapter 8: The Bean Tag Library
-The write Tag
-The cookie Tag
-The header Tag
-The parameter Tag
-The define Tag
-The page Tag
-The include Tag
-The message Tag
-The resource Tag
-The size Tag
-The struts Tag
-Summary

Table of Contents
-Introduction
-Chapter 1: Model 2 and Struts
-Chapter 2: Input Validation with Action Forms
-Chapter 3: The HTML Tag Library
-Chapter 4: Input Validation and Data Conversion
-Chapter 5: The Validator Plugin
-Chapter 6: The Expression Language
-Chapter 7: JSTL
-Chapter 8: The Bean Tag Library
-Chapter 9: The Logic Tag Library
-Chapter 10: Struts-EL, Nested, selectLabel
-Chapter 11: Message Handling and Internationalization
-Chapter 12: The Tiles Framework
-Chapter 13: Securing Struts Applications
-Chapter 14: The Config Object
-Chapter 15: The Persistence Layer
-Chapter 16: Object Caching
-Chapter 17: File Upload and File Download
-Chapter 18: Paging and Sorting
-Chapter 19: Preventing Double Submits
-Chapter 20: Early HttpSession Invalidation
-Chapter 21: Decorating Request Objects
-Chapter 22: How Struts Works

Previous
Next

 

The size Tag

The size tag creates a java.lang.Integer that contains the number of elements in the specified array, collection or Map, and creates a scoped variable referencing the Integer. The list of attributes for this tag is given in Table 8.11.

Attribute Description
collection The scoped variable referencing an array, a collection, or a Map whose number of elements will be stored in a java.lang.Integer object.
id A required attribute that specifies the name of a page-scoped variable that will be created to reference the java.lang.Integer that contains the size of the specified array, collection, or Map.
name If property is present, name specifies a scoped object containing the array, collection, or Map, whose number of elements will be counted. Otherwise, name specifies the array, collection, or Map itself.
property The property of the scoped object specified by the name attribute, that will return the collection to be counted.
scope The scope of the scoped variable specified by the name attribute

Table 8.11: The size tag’s attributes

Previous
Next