I'm trying to implement a simple pattern that is *very* common in the world of "normal" webapps:
1) Most of my application requires authentication in order to access. 2) I allow deep links to protected content. 3) When visiting a deep link, you are given a login page - after logging in, you get the content. I have a single-page GWT app that uses Places. I've spent a lot of time on this issue, and I *almost* have it working - but it's not elegant and there are still broken edge cases. If you want to experience it firsthand, visit http://www.similarity.com/#matches: The specific issues with the Places system are: * The default place is different in authenticated mode vs anonymous mode. When you are anonymous, your default place is the "hello, stranger" place but when you're logged in, the default place is "all about your account". Since I can't reset the default place in the PlaceHistoryHandler, I need to swap out the instance when I switch modes. * The PlaceController has no way to reset the current place. When an anonymous user tries to go to the #matches: link, the place is set to MatchesPlace (which my special handler translates into a "you must log in first" message). When the user logs in, I force another handleCurrentHistory(), but it doesn't actually do anything - because the PlaceController is already at MatchesPlace. I'll have to swap out the PlaceController instance when I switch modes. And now a little rant: All in all, this seems ludicrously difficult for something I could have done with dozen lines of code if I wasn't trying to use the standard GWT tools. I feel like I've wasted a lot of time learning the system, and what I've ultimately learned is that I would be better off building it from scratch. Am I the only one that thinks the Places system is WAY over-engineered, yet not all that useful? Jeff -- 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.
