0

Session timeout management

asked 2017-08-01 10:39:27 +0800

giriprasadkota gravatar image giriprasadkota
1

Hello All ,

I am trying to use session time out management in a ZK web application. So I used the automatic time-out function from Zk with a time duration of some minutes. Now I want a view this countdown timer in my webapplication (for example showing it in this way HH:MM:SS).So Please help me, if there are any methods to solve this directly using ZK timeout functions.

Thanks and Regards

delete flag offensive retag edit

Comments

Dear Duchemin, Thanks for the solution. I tried to do the same thing as mentioned in the example by activating the auto time out in my zk.xml file. But In my server i am not able to calculate the count down time. I am getting the default NaN:NaN:NaN instead of counting the timer. Please help me

giriprasadkota ( 2017-08-03 09:17:28 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-08-02 11:54:11 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

Hi giriprasadkota,

You will find a rough example of the type of structure which could be used in this scenario here: http://zkfiddle.org/sample/2c3rpsn/13-ZK-session-expiration-warning

It uses ${session.maxInactiveInterval} in zul to obtain the session timeout information, then use it to compare the current time with the expiration time on client side. It then run an interval every seconds to update the expiration clock. (in this case, a simple label component which is located by ID).

Depending on your application structure, you can improve on this first step by improving the clock UI (using a more visual clock, inserting it in a specific location of your page,...), using a globally distributed listener in zk.xml instead of the page initiator, etc. These decisions depends on your page and project structure.

Have a look ;)

link publish delete flag offensive edit
0

answered 2017-08-03 07:26:36 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

Also: a simpler approach using script and auto-timeout. Need auto-timeout activated (page level or app level) to calculate the timeout http://zkfiddle.org/sample/85cq6/6-zk-timeout-simplified

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-08-01 10:39:27 +0800

Seen: 28 times

Last updated: Aug 03 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More