Categories
Development MVC

How to create an Inctance of the Model Class in MVC Pattern – SapUI5

I am currently trying to implement the Model-View-Controller in my SAPUI5 / Fiori Project.

I managed to create an Instance of the Controller with: new sap.ui.core.mvc.Controller('controller.js')

This does not work for the Model (sap.ui.core.mvc does not contain a Model attribute).

Not I am searching for a solution, so I can call functions of the Model from the Controller, to get my data.

I already tried this code: oObjModel = new sap.ui.mode.Model(), using this I can not call functions from my Model.

Leave a Reply

Your email address will not be published. Required fields are marked *