Thursday, December 30, 2010

Events not firing or caught, though handlers created successfully


I am implementing a small GWT application containing a couple of
buttons. I take most of my inspiration from the contact tutorial.

I fire the button events with something like this:

display.getCreditsButton().addClickHandler(new ClickHandler()
public void onClick(ClickEvent event) {
Window.confirm("Firing CREDITS");
display.getLabel().setText("Firing CREDITS");

I have added extra debugging code (Window & Label).

I sink the button events with code like this:

new DisplayCreditsEventHandler() {
public void onDisplayCreditsEvent(DisplayCreditsEvent
event) {
Window.confirm("Sinking CREDIT");

I am 100% sure this code is executed, because I have set debugging
Window.confirm(...) statements all over the place and they pop-up

Unfortunately, the onClick(...) and onDisplayCreditsEvent(...) methods
are never called when I click on button. The application compiles
successfully and runs on Tomcat.

What could I be doing wrong? What could I be missing? I am using GWT
2.1.0 and Firefox 3.6.13.

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