I haven't done this in a real project yet, but I was experimenting with
something similar. I think I was able to get this kind of behavior by
wrapping the ActivityMapper implementation in a CachingActivityMapper and
wrapping that in a FilteredActivityMapper. The idea is that the filtered
activity mapper recognizes some places (like detail views) and changes them
into whatever place invokes your list activity. Then, the caching activity
mapper, having already seen an equivalent place, doesn't invoke the wrapped
activity mapper since the display region is already showing that place.

It seems rather roundabout to me, so I don't know if this is the best way to
do it, or if this is exactly what Caching/FilteredActivityMapper are for
(the documentation is pretty light there). I'd appreciate if others could
chime in with agreement or other options.

-Brian

On Wed, Dec 1, 2010 at 2:43 PM, metalhammer29a <metalhammer...@gmail.com>wrote:

> I am using GWT 2.1 MVP in my project.
>
> I have identified 4 display regions (North, West, East, Center),
> each managed by a corresponding Activity Manager.
>
> Each display region also has a corresponding ActivityMapper that maps
> a place to the appropriate activity.
> when I don't need a region, I just return null in the Activity Mapper
> for that region, and the display region is removed, as expected.
>
> However, in some cases where I have for example West, Center and East
> display regions,
> when navigating to a new place, I want to West and East display
> regions (activities) to remain as they are,
> and only the Center display region get updated with new data as a
> result of navigating to a new place.
>
> What currently happens is that West and East regions are called as
> well, resulting in unnecessary calls to fetch data. I want to avoid
> this.
>
> For example I would want the List of Items in the West region, to
> remain as they are, and selection of an item, triggers navigation to a
> new place, causing Center Region to display details of the selected
> item.
> with my current implementation, in addition to Center Region, West
> Region is also refreshed, causing the List of Items get loaded,
> despite the data being the same.
>
>
> Could you please provide some pointers on how I can update "only one"
> display region upon navigation, while keeping other display regions as
> they are ?
>
> --
> 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<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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