Skip to Content
0
Former Member
Dec 24, 2014 at 09:36 AM

Extending JSView

108 Views

Hi

I'm trying to create a BaseView class, and can't get it to work.

BaseView.js:

jQuery.sap.declare("view.BaseView");

sap.ui.core.mvc.JSView.extend("view.BaseView", { ....methods....});

and then the view itself:


MyView.js:

jQuery.sap.require("view.ViewBase");

jQuery.sap.declare("view.MyView"); //also tried without this line

view.ViewBase.extend("view.MyView", { ....methods...});

This method works for BaseController class perfectly.

But for view extension I get "undefined is not a function".

I did lots of tries, also with sap.ui.jsview();

no luck.

anyone?