I have a possible alternative suggestion - instead of messing with the browser's history function, simply don't use the history tokens for navigating through the results list. Then your back button will work as you will want it to.
I do this in my application, and it seems to work quite well. -Ben On Feb 3, 12:23 pm, Jason <jason.siem...@namsys.com> wrote: > Before I start, I'm working with GWT 2.1.1 > > In the example below the user goes to a list, pages through results, > views a record and then clicks Back. Everything works as expected, > the user is viewing page 4, clicks a row and views the record, clicks > Back and they land on page 4. But if they click Back again, it goes > to page 3, then page 2, etc. > > 1. User is on the home page -> History.newItem( HOME, true ) > 2. User selects list of records page -> History.newItem( LIST, true ) > 3. User pages through results page (using CellTable) -> > History.newItem( LIST#page2, false ) > 4. User pages through results page -> History.newItem( LIST#page3, > false ) > 5. User pages through results page -> History.newItem( LIST#page4, > false ) > 6. User selects record to view -> History.newItem( VIEW#record123, > true ) > 7. User clicks Back, token is replaced with LIST#page4 > 8. User clicks Back, token is replaced with LIST#page3 > 9. User clicks Back, token is replaced with LIST#page2 > 10. User clicks Back, token is replaced with LIST > > What I'd prefer to see is that when the press back from the record > page, it goes to the list page they were viewing and if they click > back again, it moves back to the home page. So far I've worked around > this by adding a 'Close' button to the list page that is moves them to > the home page directly. > > This would be easy if I could call 'replaceItem( TOKEN, false )' > instead of 'newItem( TOKEN, false )' in steps 2 through 5 above. This > call would replace the current URL in the browser, and rewrite the > last entry in the history stack with the new entry. > > Anyone else have this issue? -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.