Wednesday, July 25, 2012

Re: GWTEventService listener triggers additional call each time the web application is displayed in the browser

Has been a while since I used the framework, but I suspect you do not 'unlisten' events when you leave your application (see http://code.google.com/p/gwteventservice/wiki/ConnectionHandling), your session stays open and every time you reload the app a new listener is registered.
Anyway I'd suggest to update to GWTEventService 1.2 (much more recent) and ask directly in the project's group https://groups.google.com/forum/?fromgroups#!forum/gwteventservice

On Tuesday, July 24, 2012 10:58:13 PM UTC+2, gshepherd wrote:
I have a web service bundled with my GWT app and I'm using GWTEventService 1.1.1.  I need for the client to be notified when a record is added to the database via a web service call.  In the OnMonduleLoad I've added the event listener and everything works as expected.  For example, an external call comes into my web service to add a new user.  My listener gets triggered on this event and updates the GUI accordingly.
 
The problem occurs when I leave the URL of my application and then return sometime later, every time I get a new web service request to add a user my listener fires twice.  If I leave the URL again and return now it fires three times and so on.  I've verified that I'm only adding the one listener on startup, but I don't understand why my listener keeps triggering additional times each time I leave my URL and return later.
 
Any ideas would be greatly appreciated.  Thanks.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/RK7FZu7VrsEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment