On 15 juil, 21:36, David Peterson <[email protected]> wrote:
>
> Presenter Pattern API: http://code.google.com/p/gwt-presenter
I wouldn't have made the "place" a part of the presenter (it isn't any
different than the presenter registering itself a change handler on
History).
The whole point of the "place" service is to decouple your "URL
patterns" from your components: the place service just:
- listens to history change events, "interprets" them and fire
appropriate events on the event bus ("please display the contact with
ID=12345", "please display the list of contacts")
- listens to events fired by other components and updates the URL
(History.newItem(newToken, false)); for instance, when you click on a
contact in the contact list, the list fires a "picked contact (the one
with ID=12345)" event, some component listens to it and updates the
display to show the contact info, and the place service listens to it,
maps it to a history token and updates the History. Or maybe the
component that displays the contact fires a "contact displayed (the
one with ID=12345)" event, and the place service listens to this one
instead.
Maybe this fits into your gwt-dispatch project instead, but that's how
I would model the "place service".
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---