Hi,
I have learnt the SAPUI5 concepts recently. I have a Javascript View. I want to extend this View by using components and defining th extesnion points
i belive in my original view i have to define content as below so that it can be overridden:
sap.ui.jsview("my.first.view", { getControllerName: function() { return "my.first.controller"; }, createContent: function(oController) { return new sap.ui.layout.HorizontalLayout({ content : [ new sap.ui.commons.Button({id:"but1",text:'{/first}',press:oController.doSomething}), sap.ui.extensionpoint(this, "ext.first"), new sap.ui.commons.Button({id:"but2",text:'{/second}'}), new sap.ui.commons.Button({id:"but3",text:'{/third}'}) ] }); } });
I get an error at line no 10, saying sap.ui.extensionpoint is not a function.
The version of sapui5 library used is: 1.24.4. This is how I load library in index.html:
| <script id='sap-ui-bootstrap' type='text/javascript' |
| | src='/sapui5/resources/sap-ui-core.js' |
| | data-sap-ui-theme='sap_goldreflection' |
| | data-sap-ui-libs='sap.ui.commons,sap.ui.ux3'></script> |
| | <!-- add 'sap.ui.table' and/or other libraries if required --> |
The original component that encapsulates the View looks like below:
// original component jQuery.sap.declare("my.Component"); sap.ui.core.UIComponent.extend("my.Component", { metadata : { name : "GreatComponent", version : "1.0", includes : [], dependencies : { libs : ["sap.m", "sap.ui.layout"], components : [] } } }); my.Component.prototype.createContent = function() { return sap.ui.view({type:sap.ui.core.mvc.ViewType.JS, viewName:"my.first.view"}) };
I am not sure what I have missed. i ha followed the dev guide for SAPUI5. It doesn't seem to work. Please help.