Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
SAP UI5

Lead selection in Table UI


In the previous tutorial we saw, how to consume the publically available oData(Customers) and consume them using Table control.

In this tutorial we will see how to set lead selection for table control and on lead select we will display the orders placed by the customer in another table.

Procedure:
1. Create a Table control for order details
2. Add a lead selection event to the customer table
3. Based on lead select retrieve the context and set the order details table.

Note: Working on the same project for Consuming public oData.
Step 1: Create an instance of table control for order details.
clip_image001
Construct a field catalog and add columns to the table.
clip_image003
Step 2: Attach model to the order table.
clip_image004

Step 3: Attach an event to the lead selection of the customer table. Based on the lead selection retrieve the  order details for the selected context and bind it to order table.
clip_image005

Step 4: Since only one returning parameters is allowed, add both the table controls in an array and return it.

clip_image006


Output:
clip_image008



About Arun

0 Comments:

Post a Comment

Powered by Blogger.