History Token

1 view
Skip to first unread message

Simon Shaw

unread,
Aug 28, 2009, 7:54:42 AM8/28/09
to Google Web Toolkit
I have developed a simple web application with 4 pages that uses
Hyperlinks and ValueChangeHandler to move from page to page and store
history.
Although I want to keep the history functionality in this application
I do not want to show the token in the address bar of the browser.
Also, and I am pretty sure this is connected, I would like to prevent
users from entering the site from any location other than the default
landing page.
Thanks,
Simon

Thomas Broyer

unread,
Aug 28, 2009, 11:49:14 AM8/28/09
to Google Web Toolkit


On 28 août, 13:54, Simon Shaw <simonhamel...@gmail.com> wrote:
> I have developed a simple web application with 4 pages that uses
> Hyperlinks and ValueChangeHandler to move from page to page and store
> history.
> Although I want to keep the history functionality in this application
> I do not want to show the token in the address bar of the browser.

That's simply not possible (well, in IE6 and IE7, it would be, but not
on other browsers; at least with the current History implementation,
which is what 99.9% of developers using GWT actually want)

> Also, and I am pretty sure this is connected, I would like to prevent
> users from entering the site from any location other than the default
> landing page.

Oh, this is easy: in your onModuleLoad, instead of firing the current
history token, just do nothing with History (apart from registering
your ValueChangeHandler) or explicitly "move" to the landing page
(History.newItem("landing-page"))

Er, could you explain why you don't want the "bookmarkable" part of
the history feature? i'm having a hard time understanding your issue
with it...

ThomasWrobel

unread,
Aug 28, 2009, 4:07:41 PM8/28/09
to Google Web Toolkit
Guess a frame could be used to hide the token (so the whole site is in
the frame).
A bit crude, and I also would query the point.
Reply all
Reply to author
Forward
0 new messages