on 2019 Apr 22 2:38 PM
Hello SCN friends.
I'm trying to create a menu in openui5 like a Fiori Launchpad but deployed in a apache server, that's why I can't use Fiori launchpad, so I opted for using component container to host my child app when the user clicks on a menu option or tile, so I have one view for each app, inside each view I put a component container where I load my child app, this is on the onInit method, like this:
this.byId("pageCalcExtrac").addContent( new sap.ui.core.ComponentContainer({
autoPrefixId : true,
settings : { id: "childComponent5"},
height : "100%",
manifest : true,
async : true,
lifecycle : "Container",
usage : "reuseAnotherComponent"
}));
When I close the child app I need to destroy or unload it, but when I get back to the menu (custom launchpad) and enter again the child app, the app is already loaded in memory, I would like to have it loading again from scratch, the same behavior that a Fiori Launchpad does it. Somebody can tell me how can I destroy the child app when I get back to the launchpad?.
Best regards.
Jhon Jairo
Request clarification before answering.
call removecontent when you navigate back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jun, this was what I did: instead of doing it inside the navigate back button I had to handle the event onAfterHide and onAfterShow in the parent view to destroy and create the content of the child app, now it works as desire, when I'm in my child app, simply I do the window.history.go(-1) and returns to the menu view triggering the event onAfterHide of the parent view (pageCalcExtrac) destroying the content, when I enter again the child app, the parent view triggers the onAfterShow event and the child app loads from the scratch. I'm going to keep testing because this was something that I found doing some google search I'm not sure if this is the right approach but it works so far. The events onAfterHide and onAfterShow I put them inside an addEventDelegate method call inside the onInit method of the parent view.
Thanks to all.
Jhon Jairo.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.