Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. GWT MVP. How to use event bus?
  2. public class ClientFactoryImpl implements ClientFactory {
  3.     private static final EventBus eventBus = new SimpleEventBus();
  4.     /* The views */
  5.     private static final SampleView sampleView = new SampleView();
  6.     ....
  7.  
  8.     public ClientFactoryImpl(){
  9.         eventBus.addHandler(ReleaseAddedEvent.type, sampleView);
  10.         ....
  11.     }
  12.  
  13.  
  14.     // getter and setters
  15. }