on 06-20-2017 9:38 AM
Hi,
I'm researching on OVP Linklist card, I want to make two kinds of cards:
1. card with hardcoded titles/SemanticObjects/Actions:
I know I can hardcode those information in manifest.json.
2. card with dynamic titles/SemanticObjects/Actions:
I want to load those information from oData service, but as I searched UI5 toolkit, I didn't find any clue how to make this.
I'm new to Fiori/UI5 development so I think I may missed something.
Any suggestion?
Hello Wang,
https://sapui5.hana.ondemand.com/#docs/guide/0326f910c6af4fb1b86f2810ee10419e.html is the link to documentation
Yes you can use oData service, just as you would do for other overview page card, below are the details to be referred to for configuring a link list card using annotations.
Element Source/AnnotationsList Item Title
Is taken from the “Title” property of the UI.HeaderInfo annotation.
The reaction on a click event on the list item title is defined by the available annotations. The first annotation of the below list that is found defines the reaction to a click:
<
Annotations
xmlns
=
"http://docs.oasis-open.org/odata/ns/edm"
Target="<Service>.<
EntityTpe
>">
<
Annotation
Term
=
"com.sap.vocabularies.UI.v1.LineItem"
>
<
Collection
>
<
Record
Type
=
"com.sap.vocabularies.UI.v1.DataFieldWithAction"
>
<
PropertyValue
Property
=
"Action"
Path="<Field with the action name>"/>
<
PropertyValue
Property
=
"Value"
Path="<Field with the action label>"/>
</
Record
>
</
Collection
>
</
Annotation
>
</
Annotations
>
List Item Subtitle
Is taken from the “Description” property of the UI.HeaderInfo annotation.
List Item Picture
Here an image or an icon can be shown. The Url for an image has to be defined using the “ImageUrl” property of the UI.HeaderInfo annotation. The Url for an icon has to be defined using the “typeImageUrl” property of the UI.HeaderInfo.
If both are defined then the Images are shown.
Carousel Picture
For the carousel picture the same rules apply as for the list item picture. Additionally the carousel picture reacts to a click event as the list item title would
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Parsita,
Thanks for your response.
I am trying to implement a navigation to an external URL from link list card item.
In my OData entity I have a field called 'URL' containing the URL for navigation from that particular record.
Request you to review the following questions and share your thoughts -
1. Following are the CDS view annotations. The navigation is not working (same works for List cards). Can you please take a look and comment.
2. Also for the image / icon can you please confirm if I have configured the "UI.headerInfo" correctly and if yes, what are the values expected (lets say if i want to display an icon from SAP Icon Explorer) in ImageUrl and IconUrl fields.
@UI.headerInfo:{
// Link List Card Item Title
title:{type:#STANDARD,value:'AirlinesName'},
// Link List Card Item Description
description:{type:#STANDARD,value:'CurrencyCode'},
// Image URL
imageUrl:'ImageUrl',
// Icon URL
typeImageUrl:'IconUrl'
}
define view YDD_CO_CARR_LINKLIST as select from YDD_BO_OVP_SCARR as Airline {
@UI: {
lineItem.qualifier:'FlightsList',
lineItem.position:10
}
key Airline.carrid as AirlinesId,
@Search:{
defaultSearchElement:true,
ranking:#HIGH,
fuzzinessThreshold:0.8
}
// For Navigation - Begin of Code
@UI.lineItem:{
position: 20,
qualifier:'FlightsList',
//This is for navigation
type:#WITH_URL,
url: 'URL'
}
Airline.carrname as AirlinesName,
@UI: {
lineItem.qualifier:'FlightsList',
lineItem.position:30
}
Airline.currcode as CurrencyCode,
@UI: {
lineItem.qualifier:'FlightsList',
lineItem.position:40
}
Airline.url as URL,
Airline.ImageUrl as ImageUrl,
Airline.IconUrl as IconUrl
}
Thanks,
Indrajit
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.