Quantcast
Channel: SCN : Discussion List - SAP for Mobile
Viewing all articles
Browse latest Browse all 5806

Kapsel Offline OData plugin issue when retrieving number of entries in a list

$
0
0

Hello everyone,

 

I'm developing a Cordova application with Kapsel and SAPUI5. using the new OData Offline plugin from Kapsel as the Offline storage.

 

I have sap.m.Text element where I want to show the number of entries from a list:

var productQuantity = new sap.m.Text();


I bind the value assigning a formatter:

productQuantity.bindText("idProduct", productCount);


And here's the formatter code, that returns the number of entries from the /Products list:

function productCount(oValue) {        var oBindings = this.getModel().bindList("/Products");        return oBindings.getLength();
}

 

Everyting works as intended when the device is online, the issue is when offline, the product list loads fine, but the counter always shows the number 10, which is not the same number of products in the list.

Is this count operation possible with the Offline OData plugin for Kapsel? Or there's another way?

 

 

Regards,

Kenyon Tu


Viewing all articles
Browse latest Browse all 5806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>