Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: get JsonModel

$
0
0

Alternatively you can use the model's methods directly

 

var data = oTable.getModel().getProperty("/Account");

Best regards,

M.

 

PS: I sometimes prefer to use the binding directly. This is useful if there are several models attached to your control or/and if you don't know the path to it exactly. In such cases you might not want to explicitly state which model ("A", "B", ...) you want to look at and which path to use ("/Account"). You would rather like to say: "Use the model and path which is bound to the rows - I don't care which of the many models I bound to the control it is in the end, and I don't care about the path! I just want the data which belongs to the rows!". Then you could do this:

 

var oRowBinding = oTable.getBinding("rows");
var oModel = oRowBinding.getModel();
var data = oModel.getProperty(oRowBinding.getPath())

Viewing all articles
Browse latest Browse all 8124

Trending Articles



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