Hi,
i am working on a multicomponent-application.
This means i have 3 eclipse-projects, in each one component.
How can i link these 3 projects to work (also in the local test).
Component 1:
WebContent
app_one
Component.js
jQuery.sap.declare("app_one.Component"); ap.ui.core.Component.extend("app_one.Component", { metadata : { library: "app_one", name : "Corelib", version : "1.0", includes : [], dependencies : { libs : [ "sap.m" ] }, }, });
Component 2:
WebContent
app_two
Component.js
jQuery.sap.declare("app_two.Component"); ap.ui.core.Component.extend("app_two.Component", { metadata : { library: "app_two", name : "Entitieslib", version : "1.0", includes : [], dependencies : { libs : [ "sap.m" ], components : ["app_one"] }, }, });
Component 3:
WebContent
app_launcher
Component.js
jQuery.sap.declare("app_launcher.Component"); sap.ui.core.UIComponent.extend("app_launcher.Component", { metadata : { name : "Launcher", version : "1.0", includes : [], dependencies : { libs : [ "sap.m" ], components : ["app_two"] }, }, });
I think this must be working in any way!
So, the only way to solve this seems to be an implicit enhancement of the UI5-Handler in SICF.
If i give a special prefix , like sap did it with "resources/" it gives you the source from an additional ui5-application.
best regards
Hi Michael,
I don't really understand your problem. All your components have unique names, the components are in different folders. Now you just have to map the name to the folder like this:
jQuery.sap.registerModulePath("app_one", "app_one");
jQuery.sap.registerModulePath("app_two", "app_two");
jQuery.sap.registerModulePath("app_launcher", "app_launcher");
(Or the short form in this case: sap.ui.localResources("app_one") [...])
After that you can just say
new sap.ui.core.ComponentContainer({ name : "app_one" });
HTH,
Jens
Add a comment