cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple services inside a Fiori Elements v4 app

carlonnheim
Participant

Hi,

I have a set of oData v4 services and would like to use them together in a Fiori Elements app.

In essence, having multiple models in the manifest like this

"models": {
    "": {... something else ...},
    "customer": {
        "dataSource": "customer",
        "preload": true,
        "settings": {
            "synchronizationMode": "None",
            "operationMode": "Server",
            "autoExpandSelect": true,
            "earlyRequests": true
        }
    },
    "project": {
        "dataSource": "project",
        "preload": true,
        "settings": {
            "synchronizationMode": "None",
            "operationMode": "Server",
            "autoExpandSelect": true,
            "earlyRequests": true
        }
    }
}

and then do things like this (list report components showing items from the respective services)

"targets": {
    "CustomerList": {
        "type": "Component",
        "id": "CustomerList",
        "name": "sap.fe.templates.ListReport",
        "options": {
            "settings": {
                "entitySet": "customer>Customer"
            }
        },
        "contextPattern": ""
    },
    "ProjectList": {
        "type": "Component",
        "id": "ProjectList",
        "name": "sap.fe.templates.ListReport",
        "options": {
            "settings": {
                "entitySet": "project>Project"
            }
        },
        "contextPattern": ""
    }
}

The above notation (prefixing with service>) does not work and I am not finding documentation on how to make the target components load an entity from a service other than the default one. How can I achieve this?

Thanks!

//Carl

View Entire Topic
nicolas_lunet
Employee
Employee
0 Kudos

Hi Carl,

This is not supported in Fiori elements by default.
You can achieve something similar by playing around with the default model being used but even that might not work out properly as we assume we have one model only.

Besides the technical limitation, have you thought about how the navigation / routing between those page would work ? Fiori elements make some strong assumption as to what URL you use in order to determine the proper context for templating / binding. Could you share how you would achieve proper navigation in this kind of scenario ?

Regards

Nicolas