Friday, December 7, 2012

Re: Problem with Window.Location.assign(url)

i have create an issue report for this baby

On Wednesday, July 16, 2008 8:50:07 PM UTC+2, jarrod wrote:
My application has a page using a GWT module, such that the url is
something like:

http://my.domain.com/app-context/moduleA.html 

The HTML in moduleA.html includes references to the module:
src="com.domain.my.ModuleA/com.domain.my.ModuleA.nocache.js"

Module A loads fine. It contains some code that requires a redirect to
moduleB.html, such that the url should become:

http://my.domain.com/app-context/moduleB.html 

Similarly, Module B is all correctly referenced and loads up just
fine.
However, in ModuleA, when I call the following:

Window.Location.assign("moduleB.html")

The browser is redirected to:
http://my.domain.com/app-context/com.domain.my.ModuleA/moduleB.html 

In effect, the location redirect is doing so relative to the current
module's source JS file, not the browser's current URL.

I looked at the source for Window.Location, and all I can wonder is
"WTF"?

I cannot hard code the complete target URL, as my application runs on
different domains and under different contexts. I should be able to
redirect to a relative page easily enough, right? What's going wrong?



P.S. using GWT 1.5 RC1

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KfKGPAiDcEAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate