Re: Issue with development mode plugin and Custom selection script / hosted.html that allows separate debugging of multiple GWT applications on a single page
Hi
On Tuesday, October 8, 2013 7:07:34 PM UTC+2, Jamie Cramb wrote:
-- Please check this: https://groups.google.com/d/msg/google-web-toolkit/5XzZrpBjxnY/IJzN2Z6tfawJ
On Tuesday, October 8, 2013 7:07:34 PM UTC+2, Jamie Cramb wrote:
Hi all,I have a page which has multiple GWT applications running on it. When it comes to development mode / debugging from eclipse (using the dev mode plugin in chrome) we start to hit issues because if we put the "gwt.codesvr" param in the URL then all of the GWT applications on the page will try to debug and will fail (because the debugger we have running only has the source code for one of the applications in its classpath).My goal is to update the implementation of the bootstrapping process for dev mode to achieve the following:
- Externalize the decision on which GWT applications on a page should debug based on some other JS function that is resident on the page so it can be controlled via a custom mechanism / server-side decision.
- Have the ability to assign a custom "$hosted" URL (e.g. "localhost:9997") for each of the GWT applications on a page that should be debugging.
I have achieved the first goal by:
- Providing my own primary linker (an extension of the IFrameLinker) that overrides the location of the selection script template so that it uses my modified selection script
- Making my modified selection script provide a custom "isHostedMode()" implementation that calls out to a JS function that is resident on the host page for the decision of whether or not to go into dev mode:
function isHostedMode() {
$wnd.shouldDebug('__MODULE_NAME__');
}I thought I was close to achieving my second goal by:
- Using the same primary linker to override the hosted.html location with my own custom hosted.html page.
- Making my hosted.html pickup the $hosted URL from a global var resident in the host page instead of trying to pick it up from the "gwt.codesvr" param:
$hosted = decodeURIComponent(parent.debugHostUrl); However, I get a failure (return false) from the following line of code unless I have the "gwt.codesvr" param in the URL:if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName, $hostedHtmlVersion)) { ... } else { ...}On debugging the code everything looks fine going into the plugin.connect() call.Does anyone know:
- If there is a better approach to achieving my goals?
- If the dev mode plugin is hard coded in someone to expect the "gwt.codesvr" param to be in the URL even though the $hosted var is passed in on the call to connect?
Thanks in advance.Cheers,Jamie
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home