George's hack with the boolean for "don't do history stuff" is
actually a surprisingly good way to deal with History Events.

In order to achieve History events from multiple sources with multiple
targets, some validation on HistoryToken is needed, and using a
boolean variable will let you change this functionality
programmatically.  This might not seem like a big deal until you
notice how you can't click a history-link after it's been clicked
once.  Say, you open an iframe on a history event, and once it's
closed, you want to let the user click on it again without having to
click on anything else.  The only way is to inject a useless
HistoryToken with History.newItem("do nothing",false);, but now you
will lose directionality {as forward to "do nothing" looks like
backward to "do nothing"}, which means you now need to inject ("go
forward",false); AND ("go backward",false), and when a REAL history
event is fired, do History.goBack();History.goBack(); or
History.goForward();History.goForward();

It may seem like a gross hack, but it DOES help you to make your
application more static and bookmarkable.

Using anchor overrides and doing it all in javascript means you lose
state when the user actually presses back or forward, AND when power-
users view your site, they might want to open a few windows at the
same time by Ctrl+clicking links.  We all do it, and if every link
opens "javascript:void(0);", the only way to have multiple tabs of
content is to open each to the home page and manually navigate the to
the application state you want to test / experience.

Taking the time to hack with History support will be worth it when
your users start bookmarking your content, and that bookmark actually
points to the content they want to see next time.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to