Constructs an RQL query and renders its output parameter once for each element returned by the query.

Class Name




Required Input Parameters


The name of the query to execute.


The Nucleus path of the repository to query.


The name of the item type to query.

Optional Input Parameters

input Params

A comma-delimited list of values for each parameter that is required by the query. To supply the value of a request parameter, use the syntax :param-name.


The transaction manager to use. For example:

<dsp:param name="transactionManager"


Holds a string that specifies the order to render array items. For more information on using this parameter, see ForEach.

Output Parameters


The zero-based index of the returned row.


The one-based number of the returned row.


A dynamic bean that has properties for accessing the values returned in the result set. To return a particular property value for each item in the result set, use the convention, where name is any property name supported by the item descriptor.


Set to the number of returned rows.


The current key if the array is a Dictionary.


If a RepositoryException is thrown, set to the exception.

Open Parameters

The following open parameters control the formatting for the returned results:


Rendered once for each returned row.


Rendered before any output tags if the array of returned rows is not empty.


Rendered after all output tags if the array of returned rows is not empty.


Rendered if the array contains no rows.


Rendered if there is an error when the query executes.

Usage Notes

NamedQueryForEach executes a named RQL query and renders its open parameter output once for each element returned by the query. The behavior of this servlet bean is identical to RQLQueryForEach; it differs only in its use of the required input parameter queryName, which is used together with the input parameters repository and itemDescriptor to specify a named query.

In the following code fragment, queryName refers to a named query that is already set up in the specified repository. The bikePromotion value supplied to input parameter inputParams matches a parameter in that query, and is set to the value of request parameter startDate:

<dsp:droplet name="/atg/dynamo/droplet/NamedQueryForEach">
   <dsp:param name="startDate" bean="CurrentDate.dateAsTime"/>
   <dsp:param name="repository"
   <dsp:param name="itemDescriptor" value="user"/>
   <dsp:param name="queryName" value="getPromotionsByNameQuery"/>
   <dsp:param name="inputParams" value="bikePromotion, :startDate"/>
   <dsp:param name="transactionManager"

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