on 06-15-2015 6:34 PM
Hi experts,
I've created a Model in the UIComponent, but how can I Access the model using it's ID in the View?
Thanks and regards,
Sebastian
in component.js,
var sServiceUrl = "URL";
var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, true);
this.setModel(oModel, "oRModel");
sap.ui.getCore().setModel(oModel, "oRModel");
in xml view,
text="{oRModel>/Collection/EntitySet/#@sap:label}"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in controller you can access it as this.getView.getModel()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.