Returns a list of repository items of the specified item type.

Class Name




Required Input Parameters


The item descriptor within the repository.


The name of the repository item’s property, required only for enumerated properties. For properties which are themselves item types, you can set itemDescriptorName and propertyName of the linked property, or set itemDescriptorName to the linked-to property.


The name of the repository. If omitted, the default is obtained from the servlet bean’s properties file.


Required only if parameters itemDescriptorName or repository are unspecified, used to obtain the item descriptor and its repository. Use this parameter if a repository item’s underlying type and source are unknown.

Optional Input Parameters


Sets the maximum number of repository items returned by this servlet bean. If omitted, the default is obtained from the servlet bean’s maxRepositoryItems property (initially set to 500). To specify no limit, set this parameter to -1.


If set to true, sets the output parameter values to an array of PossibleValue objects.

PossibleValue objects have the following properties:


Holds a string that specifies the order to render array items. The syntax of this parameter depends on the array item type: JavaBean, Dynamic Bean, Date, Number, or String.

To sort on the properties of a JavaBean, specify the value of sortProperties as a comma-separated list of property names. You can sort on an unlimited number of properties, where the first property name specifies the primary sort, the second property name specifies the secondary sort, and so on. To specify ascending sort order, prepend the property name with a plus + sign; to specify descending order, prepend with a minus - sign.

The following example sorts a JavaBean array alphabetically by title , then in descending order of size, use this input parameter:

<dsp:param name="sortProperties" value="+title,size"/>

If the array contains Dates, Numbers, or Strings, prepend the sortProperties value with a plus + or minus sign to specify ascending or descending sort order.

The following example sorts an output array of Strings in alphabetical order:

<dsp:param name="sortProperties" value="+"/>

In order to sort Map elements by key, set the value as follows:


For example:

<dsp:param name="sortProperties" value="_key"/>

A nested servlet bean inherits the parent servlet bean’s sortProperties setting, unless it is overridden by the nested servlet bean’s own sortProperties setting. For example, the following setting negates any parent sortProperties setting:

<dsp:param name="sortProperties" value=""/>


A Boolean parameter, specifies whether to return the string or integer code value for the enumerated property identified by the propertyName parameter. Each enumerated property has a string value and integer code value specified for it in the item descriptor that defines the property itself. When useCodeForValue is set to true for the property in its item descriptor and in the PossibleValues servlet bean, the integer code value is provided to the JSP. Any other combination of values causes the string value to return.

For information on useCodeForValue in the repository item descriptor, see the EnumeratedProperties section of the SQLRepositoryItemProperties chapter of the ATG Repository Guide.

Output Parameters


Contains the array of possible values for the named itemDescriptorName and propertyName; or an array of PossibleValue objects if input parameter returnValueObjects is set to true.

Open Parameters


Rendered once with the result of the repository query. In the case of enumerated property data types, the result is an array of java.lang.String objects. In the case of properties which are themselves item types, the result is an array of repository items.

Usage Notes

PossibleValues uses the specified (or repositoryItem-implied) repository and item descriptor to produce an array of RepositoryItems. If you specify a property name through the propertyName parameter, PossibleValues returns an array of property values, each one an enumerated list of strings. Alternatively, you can generate an array of PossibleValue objects by setting the returnValueObjects parameter to true.


The following example uses the servlet beans PossibleValues and ForEach to create a form with input fields for setting an audio component’s type and manufacture. A fragment of a repository definition XML file shows the different property types to be retrieved:

<item-descriptor name="component">
  <property name="type" data-type="enumerated" ... >
    <attribute name="useCodeForValue" value="false"/>
    <option value="Receiver" code="0"/>
    <option value="Amplifier" code="1"/>
    <option value="Tuner" code="2"/>
    <option value="CD Player" code="3"/>
    <option value="DVD Player" code="4"/>
    <option value="Cassette Tape Player" code="5"/>

  <property name="manufacturer" item-type="manufacturer" ... >


<item-descriptor name="manufacturer">
  <property name="id" column-name="manufacturer_id"/>
  <property name="displayName" data-type="string"
  <property name="description" data-type="string" column-name="description"/>
  <property name="longDescription" data-type="big string"

The JSP form is defined as follows:

<dsp:form action="Audio.jsp" method="POST">

  <%-- Generate the Component Type select tag from an enumerated type --%>
  <dsp:select bean="AudioComponent.type">
    <dsp:droplet name="PossibleValues">
      <dsp:param name="itemDescriptorName" value="component"/>
      <dsp:param name="propertyName" value="type"/>
      <dsp:oparam name="output">
        <dsp:droplet name="ForEach">
          <dsp:param name="array" param="values"/>
          <dsp:oparam name="output">
            <dsp:option param="element"/>
            <dsp:valueof param="element"/>

  <%-- Generate the Component Manufacturer select tag from an item type --%>
  <dsp:select bean="AudioComponent.manufacturer">
    <dsp:droplet name="PossibleValues">
      <dsp:param name="itemDescriptorName" value="component"/>
      <dsp:param name="propertyName" value="manufacturer"/>
      <dsp:param name="sortProperties" value="+displayName"/>
      <dsp:oparam name="output">
        <dsp:droplet name="ForEach">
          <dsp:param name="array" param="values"/>
          <dsp:oparam name="output">
            <dsp:option param="id"/>
            <dsp:valueof param="element.displayName"/>

loading table of contents...