View Full Version : Help! no event listeners seem to work after migration to gxt 2.1 / gwt 2.0

5 Jan 2010, 8:32 AM
Hi there,
I have a pretty big project using gxt 1.2.4 and gwt 1.7, that i'm trying to push forward to gxt 2.1 and gwt 2.0. I've gotten through the compilation hurdles and stylesheet/resource changes and all that, so I'm able to build and launch it, and for the most part it seems to render ok and the rpcs seem to be behaving properly. However, no buttons or other widgets seem to work properly -- at least on my start page the buttons, radio groups, and tree widgets just don't seem to respond... i have tried playing around with the SelectionListeners and putting code in both the onComponentSelected and handleEvent methods but it never gets there.

I've overloaded all 3 fireEvent(EventType, etc.) methods on the Button and Radio objects to try to get an idea of what's happening, but they don't seem to detect much. They do fire once on load (or maybe render?), with the event code -1, but subsequently don't even fire anything when i click the buttons or change the radios.

Seems to me that something must be pretty fundamentally screwy with my app now, it's as if GXT just isn't getting anything from my browser interactions at all. Anyone encounter this kind of thing or have any suggestions? I can post some code if you like, but the button / selectionlistener<buttonevent> code etc. is all pretty standard and i've tried the exact code from some examples, and none works -- so i think it's got to be some kind of configuration issue or something more general like that.


5 Jan 2010, 9:26 AM
Still playing with the code, i decided to try adding a plain gwt button as well to see if it at least would respond to events:

com.google.gwt.user.client.ui.Button test = new com.google.gwt.user.client.ui.Button("help", new ClickHandler() {

public void onClick(ClickEvent clickEvent) {
Log.debug("received click event: " + clickEvent);


... sadly, this doesn't seem to work either. So I suspect that the problem is probably not with GXT itself, but since users on this forum are probably pretty good with GWT in general hopefully someone might have a suggestion for what could be going wrong -- or even make suggestions for how to debug this further.


11 Mar 2010, 9:30 AM
Yeah, I posted about this already. I tried to add a button to the pagination toolbar, which already worked before the upgrade to GWT/GXT 2+. I even added a button to a toolbar, which became the "top" component of a panel that contains a grid, still no luck.

Does yours work in hosted mode? Mine breaks after deployment.

18 Mar 2010, 12:52 PM
Sorry, been awhile since I've been back in this forum. I did fix my issues, but my code did run in hosted mode (just couldn't get any event handling). If you can't even get things to run at all, it may be a different issue. What error are you getting, any?

The problem i ran into was an overloaded onAttach method, I believe on a ContentPanel or Layout container. it's been awhile now. somehow, this was a valid time to do things before, but with the newer version of GXT it just blew everything up. Took a long time to find, too, because it was a silent failure.

Hope this helps.