How to navigate from Fiori Overview Page (OVP)?

流过昼夜 提交于 2019-12-12 03:26:41

问题


Trying to make a POC on Overview Page Cards with navigation. I have followed a few tutorials in setting up the cards and annotations using the Northwind OData service.

I want to navigate to another app by clicking on the cards. The docs say this is done using intent-based navigation. This app I am trying to navigate to is registered in Fiori Launchpad with semantic object of "Northwind" and action as "Display"

I have the Employees card setup in the manifest.json and it displays the records fine.

However, when I add the navigation parameters in the annotationPath and identificationAnnotationPath, the data is not displayed and the navigation doesn't work.

Manifest.json card snippet

            "card00": {
                "model": "NorthwindModel",
                "template": "sap.ovp.cards.table",
                "settings": {
                    "title": "{{card00_title}}",
                    "category": "{{card00_category}}",
                    "subTitle": "{{card00_subTitle}}",
                    "entitySet": "Employees",
                    "annotationPath": "com.sap.vocabularies.UI.v1.LineItem#Northwind-Display",
                    "identificationAnnotationPath": "com.sap.vocabularies.UI.v1.Identification#Northwind-Display"
                }
            }

I've also tried leaving out the action, but I get the same results.

What am I doing wrong and what is the proper way to navigate to apps from Overview Page Cards? I'm unable to find any resources on this topic.


回答1:


I happened to come across your question and see that you have found the documentation about card navigation. Although you might already have found a solution, I thought I would mention that there is also documentation about annonotations for intent-based navigation - Annotations Used in Overview Pages (com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation). Perhaps this document might be helpful or a possible future reference.




回答2:


 <Record Type="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation">
        <PropertyValue Property="SemanticObject" String="Action"/>
        <PropertyValue Property="Action" String="display"/>
        <PropertyValue Property="Label" String="northwinddemo"/>
        <Annotation Term="com.sap.vocabularies.UI.v1.Importance" EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/Medium"/>
    </Record>

try this. maybe it should work.




回答3:


You can try using the below annotation.

<Record Type="com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation">
                            <PropertyValue Property="SemanticObject" String="Action"/>
                            <PropertyValue Property="Action" String="toappnavsample"/>
                            <PropertyValue Property="Label" String="Navigation from line item"/>
                            <Annotation Term="com.sap.vocabularies.UI.v1.Importance" EnumMember="com.sap.vocabularies.UI.v1.ImportanceType/Medium"/>
                        </Record>

Here toappnavsample is the name of the application you want to navigate to on the Fiori launchpad.



来源:https://stackoverflow.com/questions/36227254/how-to-navigate-from-fiori-overview-page-ovp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!