Re: Aw: Re: Question about new activities on place changes

2011-06-27 Thread tanteanni
thx to all 3 of you! my very little example is now working (is there a place to upload examples? it is nice to understand activities and places without MVP) placeController.getWhere() is the essence that made it clear for me. thats the place the comparison uses with the place given to goTo,

Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-27 Thread Jens
Oh yeah small typo in my MainActivityMapper example. It has to be: if(place instanceof XYZPlace) { this.lastActivity = new XYZActivity(place); return this.lastActivity; } else if() {.} . So its just implemented as a field that stores the activity. Nothing fancy ;-) -- J.

Re: Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-27 Thread tanteanni
thx that's realy nice - on first sight much better than filtering/caching/overriding equal just to get the same as before. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit

Aw: Re: Question about new activities on place changes

2011-06-24 Thread Jens
Its pretty easy. If you have looked at the source code of CachingActivityMapper you see that it only calls place.equals(lastPlace) to check if it has to return the previous activity or has to create a new one. After construction of CachingActivityMapper both lastPlace and lastActivity are null

Aw: Re: Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-17 Thread Jens
Ok a Custom CachingActivityMapper was easy to implement and works but there is still a case I am not happy with. If a user bookmarks EmployeePlace(1,123) and 123 gets deleted the activity would redirect to EmployeePlace(1, null) to keep the URL in sync (activity can not preselect the deleted

Re: Aw: Re: Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-17 Thread Thomas Broyer
Because you activity lasts longer than a place, it should listen to PlaceChangeEvent (as if it were a singleton, except that it can be garbage collected and will be recreated if you go to another activity in the mean time), or the ActivityMapper should update it with the new place. But

Aw: Re: Question about new activities on place changes

2011-06-16 Thread Jens
In that case I do not wanna cache things on client side. The app should be smart enough that it doesn't try to reload the list each time a list item is selected. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on

Aw: Re: Question about new activities on place changes

2011-06-16 Thread Jens
Thanks I will try that. Haven't thought of a FilteredActivityMapper. I already tried a CachingActivityMapper on its own and because of the equality stuff it doesn't work. I have just went through some examples but the layoutmvp example posted in this group also has an activity that starts over

Re: Aw: Re: Question about new activities on place changes

2011-06-16 Thread Thomas Broyer
It must have been in an earlier version. It's still in the bikeshed's Scaffold app (thus probably in any app generated by Spring Roo btw) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit

Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-16 Thread Jens
Hm I have tried it now and at least the activity does not get restarted. But now if I bookmark my selected employee and access it later it can not be reselected because the activity filter always sets the employee id to null. The filter can not distinguish if the app is running and the user

Re: Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-16 Thread Thomas Broyer
Oh, so you have a single activity handling both the master and details? In that case, then I'd probably implement the caching by hand in the ActivityMapper (or in your own proxy activity mapper, inspired by CachingActivityMapper but doing the comparison using a more sofisticated approach than

Aw: Re: Aw: Re: Aw: Re: Question about new activities on place changes

2011-06-16 Thread Jens
Yeah its a migration to activities and for simplicity I have only defined a single display area. Thats somehow the work area of the app. The reason is that I have a custom widget (layout panel) that can do quite a lot of things. So for each place I have that custom widget that effectively