GWT MVP Roo - where are custom events and their handlers?

9 views
Skip to first unread message

zixzigma

unread,
Nov 7, 2010, 1:46:30 AM11/7/10
to Google Web Toolkit
in MVP samples: Contact 1 and Contact 2,
eventBus is used for communicating application level events.
with eventBus, one part of application informs other interested parts
of certain events, so they can take appropriate action. code:
"public class AddContactEvent extends GwtEvent<AddContactEventHandler>
"


for example: when an item is selected in left panel, an event can be
fired with the ID of selected item, so the center panel can update
with relavant info.
we had to write custom Event classes extending GwtEvent, and firing
events.

however, in Roo generated GWT MVP, Expenses App, i don't see events
being used in manner i described above.
the eventBus mainly is in charge of Navigation/Activity/Place/
History ... that i can see,
but custom events, to facilitate communication between different part
of the app, i dont see.
there are packages for "ui", "activity", but not for "event".

can someone please help ?

Thomas Broyer

unread,
Nov 7, 2010, 6:32:52 AM11/7/10
to Google Web Toolkit
There's no need for custom events in the scaffold application, they're
replaced with "navigation-oriented" events (PlaceController#goTo,
which fires PlaceChangeRequestEvent and PlaceChangeEvent, handled by
the ActivityManager to switch Activities) and RequestFactory's
EntityProxyChange "data-oriented" events.
Reply all
Reply to author
Forward
0 new messages