On 8 nov, 18:48, Sandler <[email protected]> wrote:
> Hi, im trying to dynamically embed a gwt module into an jquery
> application. In this application i have pages which contain gwt
> modules. In such an page, i simply add the gwt container div, the
> script (nocache.js) and the css tag to the html body code. The problem
> is, when i do that this way, the page gets loaded and disappears after
> the gwt module was loaded.
> Than i just get a blank page, with this script inside:
> <script
> defer="defer">andorialowlevelanimations.onInjectionDone('andorialowlevelani 
> mations')</
> script>
>
> When i add the script tag and the div id to the main startpage, inside
> the head, (where jquery and other scripts get loaded) everything works
> fine. Can anybody tell me why this happens?

Because GWT generates document.write() calls in the *.nocache.js, and
document.write() on an already-loaded page implies document.open(),
which clears the document and replaces it with an empty one.
This is the default behavior though, you can change it by implementing
your own SelectionScriptLinker (extending IFrameLinker for instance)
generating a slightly different *.nocache.js.
You'll find several discussions on this group's archives about this
"issue", and some people already went that road (I don't know if they
succeeded or gave up though)

-- 
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.

Reply via email to