Question

We are using GWT and take advantage of History framework. Everything works fine in application, but some of our clients are trying to put hyperlinks to our application in their PowerPoint presentations. But there is known problem in PP2007 with hash signs ("#") in hyperlinks which makes them unusable.

So is there any way to change separator character used in URLs generated by GWT Hisory framework to something other than hash?

Or is it possible to intercept new URL generated by GWT history and modify it before browser's adress bar is updated with it?

Was it helpful?

Solution

I don't think you can/should change the hash sign. Mainly because this sign does not come from GWT but from HTTP specifications. You can read the part on hash fragments in this doc for a good explanation. The main point being that adding a # sign to a url will not cause a full browser refresh. This is why this sign is used for ajax and GWT's history.

If you still want to intercept new URLs, you should probably add a ValueChangeHandler to your History, and then use Window.Location.getHref() and Window.Location.assign() to change the URL. But that's like using History to do something it doesn't do, so you're better off implementing your own History management system.

OTHER TIPS

See http://code.google.com/p/google-web-toolkit/issues/detail?id=7101 (there are links to sample code)

Basically, you can only do this in a browser that supports HTML5's pushState and onpopstate. This rules out Internet Explorer, and unfortunately those people using PowerPointer are likely to also use IE, so basically you're doomed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top