> I was thinking of a similar approach,
> but couldn't come up with a way to populate the lookup table
> (initialize it for the first time with data).
>
> could you please explain how you register activities/places in the
> lookup table, so that they are available at run-time ?
>

At the moment I simply populate a hash table with factories in a
static constructor.

> what is the best way to deal with scenario above in GWT MVP ?
>
> should Activities/Places mimic structure of entity they are related
> to ? (forming parallel object hierarchies ? for place/activity/proxy )

I'm not sure what is the best way, I personally use the second
approach.  While my Entity graph is complex and has cycles, my places
extend from a common EntityPlace and the hierarchy is flat and one
level only.

At the top level I have one place controller, one activity manager,
one place history mapper, one activity mapper, and one display area.
At the top of the screen I have a CellBrowser that allows a user
navigate deep down the object hierarchy, and every time a client
clicks on some node, a new activity starts and displays a
corresponding view.  CellBrowser helped me to deal with the lack of
support for nested activities/viewers.

Activities that are created when a user clicks on a CellBrowser are
complex.  They themselves create NestedActivityManager (my
implementation that is similar to GWT ActivityManager, except it
replaces onPlaceChange(Place) with startActivity(Activity)) to by-pass
places and manage nested activities directly.  This level, as the top
level, also uses MVP, but there is no integration with history tokens
and places here.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to