listening for all (most) user input in UI

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

Hi again,

The click listener I’ve attached to my UI object is not getting button clicks, but does get events like double clicks. The
JavaDocs for the method
say it should get the events unless “…the targeted component [I assume that means, for instance, a button the user clicks]
does not prevent the click event from propagating.”

Can you tell me what the above means? Does that mean propagate from the widget to the server, or from one part of the UI code to another? The button’s listener is being called, but not the one on the UI.

Thanks,
Bobby

Filed
http://dev.vaadin.com/ticket/17234
– if it’s really not a bug, then at least the JavaDocs could be more clear.

Cheers,
Bobby