Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8627

Re: how to get length of table loaded from oData/JSON model

$
0
0

thanks Max.

 

i've my oTable declaration as below:

var oTable = this.getView().byId("itemTable");

 

and added your piece of code:

oBinding = oTable.getBinding("items");
var iLength;
oBinding.attachDataReceived(function() {
     iLength = oBinding.getLength();
     alert(iLength);
});

 

Error:

Uncaught TypeError: Cannot read property 'attachDataReceived' of undefined


JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.Binding

its all same per your code and as per API.
i've used with below options as well:

oTable.getBinding("/data/items");

oTable.getBinding("\data\items");

 

is my oTable declaration suites to call oBinding class?


Viewing all articles
Browse latest Browse all 8627

Trending Articles



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