Configuring the Object Selector User
Interface
You configure the Object Selector UI pattern so that you can query and display data associated with the entities you modeling with the service modeling tool of CAS. As part of the Object Selector pattern, you will also use the Object List and Search Bar UI configurations.
You use the Search Bar to help you locate the desired data records. You use the Object List to display hits of a query in a list.
1. Launch the CAF Runtime Configurator via http://<host>:<port>/caf and logon with a user who has been assigned the CAFUIAdmin role.
2. From the list of patterns, select Object Selector, then choose New Configuration.
The Object Selector Configurator opens.
3. Enter the following:
Section in Layout |
Field Name |
Value |
Object Selector Configurator |
Configuration Name |
employeeSelector |
Search Configuration |
Configuration Name |
employeeSearchBar |
List Configuration |
Configuration Name |
employeeList |

4. In Search Configuration (Search Bar UI), choose Configure and do the following:
Screen Label |
Action |
Service |
Select sap.com/carpool/EmployeeService |
Find By Operation |
Enter or select findByLastName |
Starting phrase for search bar |
Enter Search for Employee |
5. Choose Retrieve Metadata.
All metadata associated with the object will be populated in the input parameters list.

6. Select lastName from the input parameter list and choose Save + Return.
You will be returned to the Object Selector Configurator.
7. In List Configuration (Object List UI), choose Configure and do the following:
Screen Label |
Action |
Service |
Select sap.com/carpool/EmployeeService |
Query Name |
Enter or select findByLastName |
Header for Object List |
Enter Employee List |
Allow Delete |
Activate checkbox |
8. Choose Retrieve Metadata.
The metadata associated with the service will be populated in several tables.

9. Select the corresponding attributes from the following lists:
List Name |
Values |
Comments |
Fields Displayed in Table |
id, firstName, lastName |
|
Fields Displayed as Attributes of a List |
firstName, lastName, email |
You can select a maximum of three values. |
Fields Displayed as Details in List |
id |
You can select only one value. |
10. At the bottom of the Object List UI, active the checkbox for Same Application Launched for New and Edit Mode.

11.
In the
section New
Mode (near the
bottom of the UI), choose
with the quick info text Config Name and
select Object Editor.
All configurations associated with the Object Editor will be populated in a drop-drown list.
12. Select createEmployee from Configuration Name and choose OK.
The selected configuration will be populated back into the Object List configuration UI.

13. Choose Save + Return to save your Object Selector configurations.

To test the Employee Selector UI you have just configured, launch the following URL: http://<host>:<port>/webdynpro/dispatcher/sap.com/caf~UI~ptn~objectselector/ObjectSelector?app.configName=employeeSelector.
Congratulations! You have completed the tutorial My First Entity Service, the first step in creating a composite application.
