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,
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.
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
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
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
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
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
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
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
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
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
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
12 matches
Mail list logo