Friday, March 2, 2012

Re: Selecting list items from history actions using Activities and Places

This worked out fine. However, the obvious issue is that it's pretty hard to have anything done in your app BEFORE that initial PlaceChangeEvent (say, if you directly go to a specific place via the URL) gets fired.

My solution was to write the same logic in both a placeChangeHandler and on initialization of the menu to select an item.

Thanks for the help.

On Thu, Mar 1, 2012 at 12:03 PM, Thomas Broyer <t.broyer@gmail.com> wrote:


On Thursday, March 1, 2012 4:54:04 PM UTC+1, Jens wrote:
Provide a correct equals()/hashcode() implementation in your places as mentioned in JavaDoc for Place.java.

If you don't do so, CachingActivityMapper wont cache anything because it also does an oldPlace.equals(newPlace) to see if it can return the cached activity.

...if you don't do this, you risk an infinite loop... (well, the loop should be broken by the SelectionModel, which shouldn't fire an event when you don't actually change the selection)

--
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/-/9n07mtAs3foJ.

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.

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

No comments:

Post a Comment