Filters objects in a collection.

Class Name




Required Input Parameters


Identifies the collection of objects that require filtering.

Optional Input Parameters


Specifies a string that represents the collection to filter. Each unique collection should have a unique string. This parameter is required in order to cache filtered content.


Refers to the component responsible for performing the filter operation. The default value provided to StartEndDateFilterDroplet for this parameter is atg/registry/CollectionFilters/StartEndDateFilter.


Points to a Profile RepositoryItem. Use this parameter when the filtering condition is based on profile information. If no value is provided to this parameter, the Profile associated with the active session is used. None of the implementations of CollectionFilter provided with the ATG platform use this parameter.

Output Parameters


Holds a collection of items that satisfy the filter criteria.


Holds error messages generated during the servlet bean execution.

Open Parameters


Rendered when the filter component completes processing.


Rendered if the resultant collection is empty.


Rendered if an error occurs.

Usage Notes

CollectionFilter uses collection filtering components to reduce objects in a collection. The resulting collection is accessed by an output parameter. The StartEndDateFilterDroplet instance passes the collection to the StartEndDateFilter so it can determine which items in the collection are active for the current date.

Two properties, consultCache and updateCache, govern whether CollectionFilter checks the cache for content and saves the resultant content to the cache respectively. These properties are set to true by default. There are other settings you need to configure to enable caching for StartEndDateFilter on the collection filtering component itself.

The CollectionFilter servlet bean class filter property can be set to a collection filter component, which serves as the default value for the filter input parameter.

See the Filtering Collections chapter of the ATG Personalization Programming Guide for more information on filtering collections.


In this example, all articles that are started and not ended for the current day are displayed.

<dsp:tomap bean="/atg/dynamo/service/CurrentDate" var="date"/>

<dsp:droplet name="/atg/collections/filter/droplet/StartEndDateDroplet">
   <dsp:param name="collection" beanvalue="Articles"/>
   <dsp:param name="collectionIdentifierKey"

      <dsp:oparam name="output">
      Featured Articles:
         <p><dsp:droplet name="/atg/dynamo/droplet/ForEach">
               <dsp:param name="array" param="filteredCollection"/>

               <dsp:oparam name="output">
                   <dsp:valueof param="param"/>

      <dsp:oparam name="empty">
            There are no articles today

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices