The common pattern is ActivityManager → FilteredActivityMapper → CachingActivityMapper → MyActivityMapper.
The FilteredActivityMapper's Filter transforms places to "common cases" that can be compared with .equals(). In a Spring Roo app (at least of the kind that came with the first version of the Roo/GWT integration), the filter for the "master" region transformed EntityPlace(SomeProxy.class, "someId") into EntityListPlace(SomeProxy.class) for instance. So whichever the "someId" of two consecutive EntityPlace(SomeProxy.class, …) the filtered places would compare equal. It could have transformed them into EntityPlace with the same proxy type and, san, an empty ID, but transforming to the EntityListPlace makes the "MyActivityMapper" easier to write, as it only has to handle EntityListPlace. The CachingActivityMapper compares two consecutive places with .equals() to decide what to do. If they're equal, it returns the previously returned activity (a reference of which it keeps in a field). Otherwise, it asks the "MyActivityMapper" to provide an activity for the place (generally a new instance), and it stores the place it was passed as argument, and the activity it returns, into fields; for the next round. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-I4AleJUu3QJ. 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.
