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

Why no setProperty() method on the sap.ui.model.Context Class

$
0
0

With a model context object I can do the following to obtain a value from a model:


oModelContext.getProperty("name");


Is there any reason why a setProperty() method is also not provided ?


oModelContext.setProperty("name","Trevor");


It seems that the model context object has all the necessary information to support this function:


var oModel = oModelContext.getModel();

var sPath = oModelContext.getPath();

oModel.setProperty(sPath + "/name","Trevor");


Thanks,

Trevor



Viewing all articles
Browse latest Browse all 9052

Trending Articles



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