I don't understand how your activity gets the info about the Place (in your 
case, the filter to apply).

If we think about the ActivityMapper as the one place that knows about both 
the Place and the Activity and how to bind them together, then each 
Activity should expose its own API and the ActivityMapper should then call 
it. In your case, that could be:

// in the activity
public void setFilter(String filter) { ... }

// in the mapper
if (place instanceof CustomersListActivity) {
   if (lastPlace instanceof CustomersListActivity) {
      lastActivity = createSearchActivity(((CustomersListActivity) 
place).getFilter());
   } else {
      ((CustomersListActivity) 
lastActivity).setFilter(((CustomersListActivity) place).getFilter());
   }
} else {
   // handle other places
}
// keep track of the last seen place
lastPlace = place;
return lastActivity;

-- 
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/-/yym6Yc5763IJ.
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