Handling Javascript events

Hello everyone,

I have flash component, that can raise 2 types of javascript events with some important information.
One event send only one int, second sends smth like Map<Integer, Integer>, but it’s just javascript so classes are another, I think.
Is there any way to send this events to serverside and work with them?

Thank you in advance!

UPD: I use vaadin 6, just in case.

I think the easiest thing to do is create a Vaadin Component which wraps the Flash component and catches the events on the client side and then simply relays them back to the server. Book Of Vaadin has good instructions on how to create the component.

Thank you for your answer!

I can’t find information about handling clientside events, maybe I’m inattentive, but I still need help on this…


There isn’t going to be a “simple” step-by-step explanation of how to do this, I’m afraid, as it’s not, well, simple! This is what my approach would be :

I’m not really much of a Vaadin-clientside guru, but I think you’ll need to create a custom Vaadin Component (See
Book Of Vaadin, Chapter 11
; you’ll to register for the javascript events using JSNI (https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsJSNI), and then forward them to the serverside using the Vaadin objects/methods client.updateVariable.

Personally, I’d split it into two problems to be tackled : how to send events to the the serverside from the browser (I’d be looking at the source for the bundled components, such as VButton etc) and then how to capture and and forward the javascript events.