on 2017 Jul 27 9:46 AM
Hi,
i've checked various blogs and discussions on reusability of UIComponents.
I have created two Apps, both running fine when running standalone. Both are using routing. The router is initialized in the init function of the UIComponent.
I have the requirement that the second app is embedded into the first app. I did the embedding with the ComponentContainer.
var oComponent = sap.ui.getCore().createComponent({
name: "com.abcd.reuse.ZSD_DETAIL",
settings: {
componentData: {
startupParameters: oStartupParameters
}
}
});
new sap.ui.core.ComponentContainer({
component: oComponent
}).placeAt("content");
In the second view i have a rootView hosting the empty sap.m.App. The default route is pointing to a view named Main.view.xml with a corresponding controller. My problem is, that the default view is not loaded from the embedded App. It seems that it is a problem with the router, but I am not sure. Maybe i did something wrong when embedding the app. But if i remove routing from the second app an add a page directly to the rootView it shows up as expected.
Do you have any idea on this? Am i missing something ?
Request clarification before answering.
do you have #*** in the url when the second app is embedded?
your second is app also trying to respond to that #*** but it is not suppose to ....which cause the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just a thought...when you say two Applications I assume that you have two manifest.json files...and when the component is loaded corresponding manifest.json file is loaded.
Check this blog for reusing components https://blogs.sap.com/2017/04/05/sapui5-how-to-reuse-parts-of-a-sapui5-application-in-othermultiple-...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
21 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.