Using a List Validator
The List validator compares an attribute against a list that is one of the following types:
Literal value: Ensures that the value is in, or not in, the list of literal values that you define
SQL query: Ensures that the value is in, or not in, the first column of the query’s result set
View attribute: Ensures that the value is in, or not in, the attribute of the specified view object; all rows are retrieved
View accessor: Ensures that the value is in, or not in, the specified attribute in all rows of the view object retrieved by the view accessor. This is similar to a view attribute, except that a view accessor is required to be defined when you want to use an LOV on the user interface.
The example in the slide shows a List validator that ensures that a valid customer ID is entered for an order. It is based on a view accessor, defined on the OrderEO, that accesses a view object that queries customers.
When you use a List validator, a <ListValidationBean> tag is added to the XML file.
Note: List validators based on SQL queries or VO attributes retrieve all rows of a query each time validation is performed. It is recommended that you use these types of List validators only for a relatively small set of values.