on 10-17-2016 1:28 PM
Hi All,
I have 2 applications in my fiori launchpad:
App1 which has View 1
App2 which has View 1 & View 2.
In the View1 of App1 I have Icon Tab Bar and on the click of the Icon Tab I want to load the View 2 of App2. Meaning I want to embed/reuse the same xml view of App2 in App1,
Please note:
So far, I have tried 2 approaches:
name : "hc.pe.manageaccounts",
id : "Comp4",
url : "/hcpemanageaccounts",
componentData : {
"targetViewName" : "CreateUser"
}
});
this.oCompContainer = new sap.ui.core.ComponentContainer("oCompEdit", {
component: oComp,
propagateModel: true,
height: "50%"
});
this.oCompContainer.placeAt(this.getView().byId("id"));
https://archive.sap.com/discussions/message/16627714#16627714
This approach, give me the component instance.
2. Using the "resourceRoots", in the manifest.json: THis approach only searches the local resources folder of the current application.
3. I also tried, registerResourcePath and jquery.sap.require,but could not get the solution.
Any help will be highly appreciated.
Hi Priya,
I have done something like this in some prototyping and the only thing I had to do was do call registerModulePath("some name", "server path") in the Component.js file where I want to add the view from the other application. Then in the init function of the controller I create the component and place it into the view like so:
var component = sap.ui.getCore().createComponent({
name: "some name"
});
var oCompCont1 = new sap.ui.core.ComponentContainer({component: component});
oCompCont1.placeAt(view.byId("somePage"));
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.