Have a look at the Showcase sample's code for the tree view on the left:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java#97

On Wednesday, February 29, 2012 9:51:51 PM UTC+1, Shaun Tarves wrote:
>
> It does, but this is a differrent issue. The selectionmodel needs to be 
> notified of selection somehow if the user isn't selecting with mouse or 
> keyboard. 
>
> My problem is when the user *navigates* to a state in the app where an 
> item should appear to be selected  - directly via a URL (as supported by 
> activities/places) or using back/forward buttons - rather than by clicking.
>
> For example, I click an Item in the CellList, the onSelection change 
> handler fires an event to go to a new place. The Item appears 
> selected...all is good. However, when the user clicks the back button, for 
> example, I now need to select a DIFFERENT item in that CellList to 
> represent the last place they were on. The history manager fires some 
> placeChangeEvent that I can listen for. So I attach a handler to that 
> PlaceChangeEvent that tells the list to select and item.
>
> The problem is that the selection handler, upon being told to select the 
> item representing where I *actually* am, will AGAIN fire the event to go 
> to a new place (as it should). Now, I've got a bad loop.
>
> I hope that makes the problem clearer. I can't wrap my head around how to 
> make this work.
>
> - Shaun
>

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