It definitely helps quite a bit - thank you. On Mar 11, 8:19 pm, Jens <[email protected]> wrote: > You do not have to use MVP in order to use EventBus. If you do not use > dependency injection with google-gin just create a factory class with a > static getter that returns an EventBus singleton, something like > AppEventBus.get().. > > If you do not want to use an EventBus you could use this.addHandler inside a > widget to register custom event handlers. So you would define an interface > like HasFormSubmittedHandlers that has an > addFormSubmittedHandler(FormSubmittedHandler handler) method, a > FormSubmittedEvent that extends GwtEvent and a FormSubmittedHandler > interface that extends EventHandler. > Now let your composite or dialogbox subclass implement > HasFormSubmittedHandlers and in addFormSubmittedHandler just call > this.addHandler(handler, FormSubmittedEvent.TYPE). > Now you can fire your custom FormSubmittedEvent inside this > composite/dialogbox via this.fireEvent(new FormSubmittedEvent(...) ). If > your composite/dialogbox listens for SubmitComplete events from the > FormPanel you could gather all information you need and then fire your > custom event once you received a SubmitComplete event. > > Hope that helps.
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
