Depending on how your app is structured you can implement a Place
hierarchy.

AppPlace or just Place

Type1Place extends AppPlace (or Place)
Type2Place extends AppPlace (or Place)
Type3Place extends AppPlace (or Place)

HomePlace extends Type1Place
ContactUsPlace extends Type2Place etc....

and you main content area updates with each new place while the others
only respond to the Types (instanceof)

You probably already know this but this is how I would solve it if the
app is organized in a particular way


On Dec 1, 3:36 pm, Brian Reilly <[email protected]> wrote:
> 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 
> <[email protected]>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 [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > 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 [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.

Reply via email to