I am trying to play with OpenUi5. I want to set 'artificial model' change the value and print it. My code:
onInit: function () {
this.getView().setModel(new sap.ui.model.json.JSONModel());
this.getView().getModel().setData({"name":"Jon"});
this.getView().getModel().setProperty("name", "Ann");
var name = this.getView().getModel().getProperty("name");
window.alert(name);
It says that name is null.
Why is that so?