0
votes

I am working on a sap Kapsel offline Fiori app that consumes an odata service protocol.

I wanted to add two more views : a worklist view and object view .

I have a button that redirects me from master detail view to the worklist view & then from the worklist view to the object view.

The navigation from master detail view to worklist view works fine. But from the worklist view to object view doesn't work because i don't know how to set it up in manifest.json

Here's my manifest.json :

"routing": {
    "config": {
        "routerClass": "com.MyRouter",
        "viewType": "XML",
        "viewPath": "com.view",
        "targetAggregation": "detailPages",
        "clearTarget": false
    },
    "routes": [
        {
            "pattern": "",
            "name": "main",
            "view": "Master",
            "targetAggregation": "masterPages",
            "targetControl": "idAppControl",
            "subroutes": [
                {
                    "pattern": "{entity}/:tab:",
                    "name": "detail",
                    "view": "Detail"
                }
            ]
        },
        {
            "name": "catchallMaster",
            "view": "Master",
            "targetAggregation": "masterPages",
            "targetControl": "idAppControl",
            "subroutes": [
                {
                    "pattern": ":all*:",
                    "name": "catchallDetail",
                    "view": "NotFound",
                    "transition": "show"
                }
            ]
        }
    ]
}
},

Any Help would be appreciated

1

1 Answers

0
votes

Just in case if there is someone still looking for an answer for this:

You can add a route to the routes array and corresponding target in "targets" object of your manifest.

for example: Add a route as(goes inside routes array of the manifest:

"routes": [ ..
   {
      "pattern": "object",
      "name": "object",
      "target": "object"
    } 

] A corresponding target when this path is matched should be defined in the targets as:

"targets": {
    "object": {
      "viewName": "Object"
    }

}

In this case, as soon as the pattern object is matched in the URL, view Object will be loaded.

For more information and detailed understanding on this, visit: https://sapui5.hana.ondemand.com/#/topic/e5200ee755f344c8aef8efcbab3308fb