on 12-07-2017 12:19 PM
Hi all,
I have a data source where entries are identified not by a single key attribute but by a (possibly) large number of attributes. The data is available in OData format. I want to display that data in the "SAP Fiori Worklist Application". However, navigating to a detail view doesn't work, because I don't know how to pass multiple values from the worklist-controller to the detail-controller. All samples and tutorials I found only work with one value.
Here are some code snippets:
This is from the worklist-controller. I want to pass these two values to identify the entry and navigate to the corresponding detail page.
_showObject: function(oItem) {
var oCtx = oItem.getBindingContext();
this.getRouter().navTo("object", {
G_DEVICE: oCtx.getProperty("G_DEVICE"),
G_CREATED: oCtx.getProperty("G_CREATED")
});
},
In the detail-controller, I'm retrieving the values and binding the view
_onObjectMatched : function (oEvent) {
var args = oEvent.getParameter("arguments");
var device = args.G_DEVICE;
var created = args.G_CREATED;
this.getModel().metadataLoaded().then( function() {
var sObjectPath = this.getModel().createKey("T_IOT_DA496D4F2BBE1E39BF4F", {
G_DEVICE : device,
G_CREATED : created
});
this._bindView("/" + sObjectPath);
}.bind(this));
},
However, I do not know how to modify the manifest.json accordingly. Right now, it is as following which is obviously wrong.
{
"pattern": "T_IOT_DA496D4F2BBE1E39BF4F/{G_DEVICE}",
"name": "object",
"target": ["object"]
}
How can I modify the pattern accordingly? It should also work for more than two variables.
Thank you very much for responding!
Hello Ulrich,
I don't know if this could help you but in one app that I made this was the way to do this in manifest.json file:
{
"pattern": "DetScale_S3/{MillTypeId},{PorcMaxEst}",
"name": "DetScale_S3",
"target": ["DetScale_S3"]
}
Hope this could be what you're looking for.
Jhon Jairo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jhon Jairo
it's so easy! Thank you very much!
Regards,
Ulrich
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.