on 12-24-2014 9:36 AM
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?
I came the same issue. I use JQuery's extend instead.
1. Define a xx.js like a util:
jQuery.sap.declare("xx.xx.xx");
xx.xx.xx = {
''''
};
2. in the view file:
jQuery.sap.require("xx.xx.xx");
........
createContent : function(ctl) {
jQuery.extend(true, this, xx.xx.xx);
.....}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hope this helps - SAPUI5 SDK - Demo Kit
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.