I've knocked up a quick example of what I was meaning, I think it works for all the cases you described. I'd be interested in how your app is different -
https://github.com/chrisprice/menubodyexample/blob/master/src/com/scottlogic/cprice/menubodyexample/client/menu/Menu.java (n.b. the instanceof and string equality code is a dirty hack!) On Wed, Feb 29, 2012 at 8:51 PM, Shaun Tarves <[email protected]> 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/-/oGLD5HqYR0cJ. > > 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. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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.
