Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I achieved something on these lines for our project. I wanted a event-driven mechanism (think of PropertyChangeSupport and PropertyChangeListener of standard jdk lib) which were missing. I believe there is an extension module and decided to go ahead with my own. You can google it for propertychangesupport gwt and use it or go with my approach.</p> <p>My approach involved logic centred around MessageHandler and GWTEvent. These serve the same purpose as that of PropertyChangeListener and PropertyChangeEvent respectively. I had to customize them for reasons explained later. My design involved a MessageExchange, MessageSender and MessageListener. The exchange acts as a broadcast service dispatching all events to all listeners. Each sender fires events that are listened by the Exchange and the exchange the fires the events again. Each listener listens to the exchange and can decide for themselves (to process or not to process) based on the event.</p> <p>Unfortunately MessageHandlers in GWT suffer from a problem: "While a event is being consumed, no new handlers can be hooked". Reason given in the GWT form: The backing iterator holding the handlers cannot be concurrently modified by another thread. I had to rewrite custom implementation of the GWT classes. That is the basic idea.</p> <p>I would've posted the code, but I am on my way to airport right now, will try to post the code as soon as I can make time.</p> <p><strong>Edit1:</strong></p> <p>Not yet able to get the actual code, got hold of some power-point slides I was working on for design documentation and created a blog entry. </p> <p>Posting a link to my blog article: <a href="http://questzen.blogspot.com/2010/05/event-handling-in-gxt-gwt.html" rel="nofollow noreferrer">GXT-GWT App</a></p> <p><strong>Edit2:</strong></p> <p>Finally some code soup. <a href="http://questzen.blogspot.com/2010/05/gxt-gwt-code-nuggets.html" rel="nofollow noreferrer">Posting 1</a> <a href="http://questzen.blogspot.com/2010/05/gwt-gxt-building-message-event.html" rel="nofollow noreferrer">Posting 2</a> <a href="http://questzen.blogspot.com/2010/05/gwt-illustrating-usage-of-previous.html" rel="nofollow noreferrer">Posting 3</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload