I am trying this example in this I have to add total product count number i.e. total table rows display on screen.
https://sapui5.netweaver.ondemand.com/sdk/explored.html#/sample/sap.m.sample.Table/preview
When I try to Access length of JSON object i.e.:
<headerToolbar>
<Toolbar>
<Label text="Products"></Label>
<Label text=""{ path: '/ProductCollection', formatter: 'sap.m.sample.Table.Formatter.totalFormatter' }""> </Label>
</Toolbar>
</headerToolbar>
totalFormatter:function(results) { return results.length; }
I get SAPUI5 is not render error:
Uncaught TypeError: Cannot read property 'length' of undefined