When you create a search form, it is good practice to provide users with a set of drop-down lists where they can specify the values to include in their search. The PossibleValues component, an instance of atg.repository.servlet.PossibleValues
, takes enumeration or RepositoryItem
properties, queries the database for their values, and returns these values for use by a servlet bean such as ForEach, which can display the query results.
For example, you might want to query Recipe items on three properties: Appliance, PrepTime, and Course. You can construct three drop-down lists that display the complete set of property values:
A component that supports advanced searches can generate a list of possible property values without using the PossibleValues
servlet bean as follows:
Set
propertyValues
to hold the desired properties.Set
propertyValuesByType
to hold each property and its possible values in a key/value relationship.
For more information, see How Advanced Searches Operate.