Monday, May 31, 2010

How to add new event to HandlerManager

Hi, I'm fairly new to GWT and I'm trying to add events to my

final HandlerManager eventBus = new HandlerManager(null);

eventBus.addHandler(RequestEvent.TYPE, new RequestEvent.Handler() {
public void onRequestEvent(RequestEvent requestEvent) {
if (requestEvent.getState() == State.SENT) {
System.out.println("RPC sent!");

This RequestEvent event works fine, but this doesn't work for
instance...or at least I don't think it works:
eventBus.addHandler(KeyPressEvent.getType(), new KeyPressHandler()
public void onKeyPress(KeyPressEvent arg0) {
System.out.println("Key pressed event!");

Any tips are greatly appreciated!

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment