on 04-19-2017 12:50 PM
Hello Experts,
I'm trying to extend the sap.m.Page without success.
I extended it without using additional properties, the code looks like this:
"use strict";
jQuery.sap.declare("controls.MultiHeaderPage");
sap.m.Page.extend("controls.MultiHeaderPage", {
metadata : {
properties : {
multiHeader: {type : "string", defaultValue : ""}
}
},
renderer: {}
});
In my xml I changed Page to MultiHeaderPage:
<mvc:View
controllerName="x.main"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns:custom="controls"
xmlns="sap.m">
<App id="app">
<pages>
<custom:MultiHeaderPage showNavButton="false">
<content>
</content>
</custom:MultiHeaderPage>
</pages>
</App>
</mvc:View>
However I'm getting errors regarding the content aggregation:
Uncaught Error: failed to load 'sap/m/content.js' from...
What am I missing?
How can I extend to sap.m.Page?
sap.ui.version is 1.38.7
Regards, Omri
Solved it on my own.
When extending control that has aggregations we should use the prefix for each aggregation so instead of <custom:content> one should use <custom:content>
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.