on ‎2019 Mar 27 4:50 PM
Hi All,
We are working on SAPUI5 Application. I have a Geo Map and Detail screen. In Geo Map Screen i loaded the Collection (EntitySet). when you click the spot on the map, it show the details in the detail screen.
We implemented EntitySet and Get Entity method at the back end. we added some more fields in the Entity method. So i can show only , few details in the Map area and more info in Details screen.
But when i select the spot, i did not see the additional info on the details screen. it loads the information from my GetEntitySet view/model. I put the break point in the back end, i did not trigger.
But when i put some random values( as a key), it got triggered.
Image 1:

My Code to bind the element in the detail view is below:
var abc = "000000111743";
this.getView().getModel().metadataLoaded().then(function () {
var sObjectPath = this.getView().getModel().createKey("EntitySet", {
Qmnum: abc
});
this._bindView("/" + sObjectPath);
}.bind(this));
_bindView: function (sObjectPath) {
this.getView().bindElement({
path: sObjectPath
});
},
Please help me on this.
Thank you,
Regards,
JK.
Request clarification before answering.
Hi Jayakrishnan,
Odata caches all the requests data in order to avoid the extra service calls.
You can check the cached data using " this.getModel().oData ".
In your case, when you randomly set the key parameters, it first checks in the existing cached data whether any record exists or not with the given key parameters. Since this check fails, it sends a new Odata request to the back-end and your breakpoints are getting triggered.
Why don't you write the same logic in your entityset method as well to populate the extra fields?
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.