Let's create List Card.
In this blog, we will create List Card like this.
In this blog, we will create List Card like this.
Step 1. Prerequisites
To create cards in OVP, there are three things to set.
- oData service entity
- annotations
- card type (or templates) and configurations
For connecting oData services, it was handled in previous posts.
It is assumed that NorthWind oData source is connected.
Step 2. Add Annotation File
Annotations are the settings that related to the way how to represent oData.
Depending on the OVP projects, we may need multiple annotation files.
So it is recommended to create the folder for annotation files. (webapp/annotations)
And let's create annotation file
Set annotation file name and select oData Service.
Annotation file for Northwind oData service is created.
In this example, "Customers" entity will be used.
Select "Customer" entity type and click "+" button to add LineItem annotation.
LineItem annotation is added. Click "+" button to add data fields.
For first data field, set value as "ContactName".
Add two more data field and set Values as "CompanyName" and "Phone" in order.
Add cards.
Set datasource.
Select list type template.
Set entity set, title and subtitle.
(Optional) Set List Type as "Condensed". (if it is not set, default setting is "Condensed".)
Now it is ready. Rut this as SAP Fiori Launchpad sandbox.
Source Code:
No comments:
Post a Comment