3.5.4. Customer Editor With a List of Orders
Do the following to display the list of Orders in the Customer’s edit screen:
-  Go to the Generic UI tab on the navigation panel. Choose customer-edit.xmlscreen and click Edit.
-  Go to the Datasources tab on the screen designer page and click New. 
-  Select the newly created datasource in the list. Its attributes will appear in the right part of the page. 
-  Specify collectionDatasourcein the Type field.
-  Select Orderentity in the Entity list.
-  The data source identifier − ordersDs- will be automatically generated in Id field.
-  Select _localview in the View list.
-  Add the WHERE clause to the query generated in the Query field: select e from sales$Order e where e.customer.id = :ds$customerDs order by e.dateThe query contains orders selection criterion with ds$customerDsparameter. The parameter value named likeds${datasource_name}will contain id of the entity selected indatasource_namedatasource at the moment, in this case it is the id of the Customer being edited.  
-  Click Apply to save the changes. 
-  Next go to the Layout tab in the screen designer and find the Labelcomponent in the components palette. Drag this component to the screen components hierarchy panel and place it betweenfieldGroupandwindowActions. Go to the Properties tab on the properties panel. Enter the label valueOrdersin the value field. Tip TipIf the application is intended to be used in multiple languages, use the  button next to the value field to create the new message button next to the value field to create the new messagemsg://ordersand define label values in required languages.
-  Drag Tablefrom the components palette to components hierarchy panel and place it betweenlabelandwindowActions. Select this component in the hierarchy and specify table size in the Properties tab: set100%in the width field and200pxin the height field. ChooseorderDsfrom the list of available datasources. Then generate the table identifier using the button next to the id field: button next to the id field:ordersTable.  
-  Click OK on the top panel to save the changes in the screen.