on 02-24-2015 9:57 AM
Hi
In my project there is view let it be s5, i need open dialog box depend upon the data in a model.
If i checked in Init function().... it will trigger only once. If i go to the next view and came back to s5, since model is empty it will not open dialogbox.
So is there any Function or event which calls every time, when the view is displayed .
I also tried with handleroutematched() function, but it called before the control goes to that view. SO if i open DialogBox in handleroutematched(), it close automatically when the view is loaded.
Thanks
You can use application context object to share and store data between the pages put your data in it before leaving the page and retrieve it after rendering the page once you get back to the original page
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
afterRendering / beforeRendering will work for each view, if u go to new view then the new view will have afterRendering / beforeRendering.
Back button,is special case. You can search in google, you will find different ways to handle browser back button event & u should be able to intigrate it into ui5
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandish,
You can use the beforeRendering or afterRendering method as described here:
https://sapui5.hana.ondemand.com/sdk/#docs/api/symbols/sap.ui.core.mvc.View.html
Kind regards,
Ted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandish,
Are you using routes? You should be able to use the attachPatternMatched.
Regards,
Jamie
SAP - RIG
Jamie Cawley has a point, do something like :
this._oRouter = sap.ui.core.UIComponent.getRouterFor(this);
this._oRouter.attachRouteMatched(this._handleRouteMatched, this);
_handleRouteMatched: function (evt) {
//load a model, show a dialog
}
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.