tell me more icon Creating a Lookup View Object

A dynamic LOV is based on a view object which provides the SQL to populate the list of values. You will define the view object and specify the query that will used as the basis for the LOV in this case, retrieving all the customers. Once you've configured a view object to provide a list of values for a given field, you can easily allow that list to be used for validation. In this example, you can ensure that the CustomerId value that a user enters in the editOrders form is a valid CustomerId, that is, a value that is in the list of values.

The general steps are:

  • Define a new view object ( CustomerView) with a query to retrieve all the customers
  • Make the view object available to the Orders entity object by adding it as a view accessor
  • Configure the CustomerId attribute in the Orders entity object to validate against the PersonId field from the CustomerView

To begin creating a view object, you will launch the Create View Object wizard. To launch the wizard, in the Application Navigator, right-click the project and choose New . In the New Gallery, select ADF Business Components in the Categories tree and View Object in the Items list and click OK.

You will enter the query statement on step 2:

false ,,,,,,,,,,,,,,,