Tag: useBean

The wcf:useBean tag creates a list or map object.

Tag information
Body Content empty


Attributes

Attribute Required Request-time Type Description
var true true java.lang.String The name of the scoped instance variable.
scope false false java.lang.String The scope for the instance variables specified by the var attribute. The scope values are page, request, session, application. Default is page.
classname true true java.lang.String The classname for which the instance is to be created. The value can be either List or Map.
capacity false true java.lang.Integer The initial capacity of the list or map instance to be created.


Variables

No variables are defined for the wcf:useBean tag.


Example

The following example uses the wcf:useBean tag to define a HashMap that has the name "cachedCategoryViewMap". This HashMap holds category view objects within the request scope:

The following example uses the wcf:useBean tag to define a list that is to include the "brands" that are within the page scope:


Related tasks
Defining the storefront assets for Commerce Composer layout templates


Related reference
WebSphere Commerce foundation tag library