Vaadin 7 : Updating the server with the next request.

Hi,

With Vaadin 7 client side components/extension - how can one update a server side component/extension on the next request without forcing one?

Rationale: we have a few use cases where different logic is executed, based on which component currently has the focus. As far as I can see, there is currently no way in Vaadin to find out which component currently has the focus, so we’ve implemented an extension (in v7, a component in v6) that uses JQuery to bind to the document’s focusin/focusout events.
e.g. $wnd.jQuery($wnd.document).focusin(handler); $wnd.jQuery($wnd.document).focusout(handler); We don’t really want to send an event to the server every time the focus changes - cos there could be loads of changes - but we would like an event to “tag along” with the next request. Currently, we only send an event (via rpc proxy) if the focus changes AND if there are any server side listeners registered, but it’d be better to piggy back onto the existing request if possible.

Cheers,

Charles.

To answer my own question - but in case anyone else is following - it looks the @Delayed annotation is the thing to use.
See the
Reducing server round trips for components
article on the Wiki.