CollectionModel(Collection collection, BeansWrapper wrapper) Creates a new model that wraps the specified collection object.
Parameters: collection - the collection object to wrap into a model. Parameters: wrapper - the BeansWrapper associated with this model.Every model has to have an associated BeansWrapper instance.
Creates a new model that wraps the specified collection object.
Parameters: collection - the collection object to wrap into a model. Parameters: wrapper - the BeansWrapper associated with this model.Every model has to have an associated BeansWrapper instance. Themodel gains many attributes from its wrapper, including the caching behavior, method exposure level, method-over-item shadowing policy etc.
Retrieves the i-th object from the collection, wrapped as a TemplateModel.
throws: TemplateModelException - if the index is out of bounds, or theunderlying collection is not a List.