on 08-01-2017 3:21 PM
Hi All,
Can any one helps me that how can I load external UI5 library project to my custom SAPUi5 project
I am trying to load HCM_COMMON library to custom project but no luck
below is my code, I tried called with "jQuery.sap.registerModulePath", no luck and tried in a below way.
Any clues really helpfull
(function() {
var sPath = jQuery.sap.getModulePath("com.sap.TestApp");
if (sPath.indexOf("/YFioriStater") !== -1) {
if (sPath.lastIndexOf("/") !== sPath.length - 1) {
sPath += "/";
}
jQuery.sap.registerModulePath("sap.hcm.lib.common",
sPath + "../hcm_common/sap/hcm/lib/common/");
}else{
jQuery.sap.registerModulePath("sap.hcm.lib.common","../hcm_common/sap/hcm/lib/common/");
}
}());
sap.ui.define(['sap/ui/core/UIComponent','sap/ui/core/mvc/XMLView'],
function(UIComponent, XMLView) {
"use strict";
var Component = UIComponent.extend("com.sap.TestApp.Component", {
metadata : {
dependencies : {
libs : [
"sap.m",
"sap.ui.layout",
"sap.hcm.lib.common"
],
components : []
}
}
});
Component.prototype.createContent = function () {
// create root view
var oView = sap.ui.view({
id: "TestView",
viewName: "com.sap.TestApp.view.View1",
type: "XML",
viewData: {
component: this
}
});
return oView;
};
return Component;
});
Thanks
Rajesh
Hi All,
Resolved, below piece of code(component.js) sorted my issue
(function() {
jQuery.sap.registerModulePath("sap.hcm.lib.common", "/sap/bc/ui5_ui5/sap/hcm_common/sap/hcm/lib/common/");
}());
Thanks
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.