Hi all,
This is related to
polling and session timeouts
, but is a more specific question (again from a v7 newbie). Since the polling calls defeat the normal container timeouts, I’m wondering if I can actively capture user events, as opposed to trying to ignore non-user events. It looks like I can add a listener to the UI objects to capture all click events, which greatly simplifies the problem (*). Is there also a way to capture keyboard events? I don’t expect anyone to be typing for >30 minutes in the app, but it’s a usability concern that someone may not be using a mouse to navigate the UI. Though, for all I know, “clicking” a button using the keyboard might be the same event as a button click.
(*) When any user input happens, store a timestamp in the session. During the poll() call, check to see if that timeout is older than HttpSession#getMaxInactiveInterval seconds.
Thanks,
Bobby