Re: Inner Activity Place Token Changes
In our application, the Mapper passes the info from the Place to a
setter exposed by the Activity, just as you have done below. In my
attempt 1, the code to re-apply the filter is in the setFilter method
- it checks if the Activity has started, and then applies the passed
filter. If it not, it is stored as a member and applied at onStart.
On Jan 22, 10:15 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> 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 post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home