on 02-11-2015 8:52 AM
Hi,
i´m trying to implement an automatic logout functionality in my sapui5 application.
I need to reset an integer every time the user is working with the ui.
Every time i call a function i also call the sap.ui.getCore() because of controller functions so i wish to extend the getCore() function to do this.
I dont want to change the standardcode so what can i do? Is there a better way to get a inactivity timeout in sapui5?
Do i have to add a timeoutrefresh every single time in all of my controlleractions?
Maybe there is a simple way to do this but i don´t know it.
Thank you for ideas and help.
With best regards from germany
Sascha Köhler
Hi Sascha,
Why not simply use the Core's attachControlEvent() method? That should be fired upon any interaction with the UI.
If you declare it in your controller's onInit() event handler, you can do the reset there:
onInit : function(oEvent) {
sap.ui.getCore().attachControlEvent(function (oEvent) {
// perform your reset function here
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.