As a workaround, you might be able to get your app to check if it's in dev mode and if it is, use JSNI method to get all the anchor tags and convert them. Ian
http://examples.roughian.com 2009/10/15 itsnotme <[email protected]> > > Hi Chris, > > thank you for your answer. I was talking about links that are out of > GWT control. I understand that most apps do not need this, but I'm > exactly in that corner case. Since my app is going to be integrated in > pre-existing web applications, every time a new page is called, the > hosted mode is lost and the only thing I can do is to manually add the > parameter in the browser bar each time. Wouldn't a web.xml servlet > configuration parameter be enough to change from development to > production mode? In development mode a header might be added to each > response, thus allowing the browser to know that we are in dev mode. > > On 14 Ott, 18:18, Chris Ramsdale <[email protected]> wrote: > > For now the gwt.hosted parameter is the "glue" that allows the browser > > plugin and your IDE to communicate. There are a couple of methods for > > handling this parameter in such a way that the same code works in > > development and web mode. > > *In the current MS1 build:* > > > > String gwtHostedIp = Window.Location.getParameter("gwt.hosted"); > > > > String newUrl = Window.Location.getProtocol() + "//" + > > Window.Location.getHost() + "/newPage.html"; > > > > if (gwtHostedIp != null && !gwtHostedIp.equals("")) { > > > > newUrl += "?gwt.hosted=" + gwtHostedIp; > > > > } > > > > Window.Location.replace(newUrl); > > > > *In the upcoming MS2 build:* > > > > import com.google.gwt.http.client.UrlBuilder; > > * > > UrlBuilder builder = > > Window.Location.createUrlBuilder().setPath("/newPage.html"); > > * > > * > > > > Window.Location.replace(builder.buildString()); > > > > In the MS1 example you will need to preserve any query parameters that > you > > want to pass on to the new page (just as you would be doing with the > > gwt.hosted parameter). Using the MS2 UrlBuilder class these parameters > will > > be preserved for you. > > > > - Chris > > > > * > > > > > > > > On Tue, Oct 13, 2009 at 5:37 AM, itsnotme <[email protected]> wrote: > > > > > Hi, > > > > > I'm developing a GWT 1.7 app that must be able to work in any website. > > > I tried to switch to 2.0 milestone 1, but the new dev mode requires > > > gwt.hosted in the URL. This is an issue for me since every time I > > > change page in the test site, I loose the gwt.hosted parameter. > > > > > Is there really no other way to pass that parameter to the browser > > > plugin? I know that it is not a problem for most GWT apps that just > > > need a URL to load a page that will host the GWT module, but some > > > other apps might be affected by this change. > > > > > In the meanwhile, I'm sticking with 1.7, although the new dev mode > > > definitely rocks. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
