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

Re: How can I access a model set to the component?

$
0
0

Probably because your module is outside the MVC scope (i.e. your module has no awareness of any model set to your view / component)

 

But you can of course always pass a reference to your model into your module:

 

// your javascript module

sap.ui.define([

    "sap/ui/model/json/JSONModel",

], function (JSONModel) {

    "use strict";

 

 

    return {

        doSomething : function(oModel) {

            // do something with the passed oModel

        },

    };

});


Viewing all articles
Browse latest Browse all 3116

Trending Articles



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