On 9 sep, 04:10, Andrew Lee <[email protected]> wrote:
> Hi Thomas -
> Thanks for the info. That sounds like it would work great if I had control
> over the host page. Unfortunately what I'm trying to do is make an
> embeddable widget, so I will not actually have any control over the host
> page.

Have a look at this then: 
http://groups.google.fr/group/google-web-toolkit/msg/fce0b435446877f7
(link #3)

> I've managed to dynamically insert CSS into the page, so I don't
> actually need the nocache.js file to do any of the CSS for me.
>
> I would need to load the js dependencies though... have you ever done this
> manually? Any idea where docs might be? Is this even possible?

Using a <script/> in your gwt.xml (just as you could have done with
CSS and the <stylesheet/> element)?
and/or using ImmutableResources/ClientBundle?
http://code.google.com/p/google-web-toolkit-incubator/wiki/ImmutableResourceBundle
http://code.google.com/p/google-web-toolkit/wiki/ClientBundle

If you really do want to customize the bootstrap sequence (I wouldn't
do that, as it means far more maintenance IMO; unless you inherit an
existing primary linker and don't modify its template), have a look at
http://code.google.com/p/google-web-toolkit/wiki/LinkerDesign and how
IFrameLinker or XSLinker are implemented.
Using this approach, you could have your nocache.js contain a section
generated by a servlet (parsing the Accept-Language, most likely
making use of the server utilities from the GWT Incubator) to
initialize a variable, and override the <property-provider
name="locale"> with one that uses this variable instead of looking at
the query-string and/or meta.
...but you could do the same by first injecting a script that'd
initialize a global variable and then use that variable in your
<property-provider> (just like I proposed a year ago with the
langdetect service; but you could use your own servlet instead; most
likely based on the server utilities from the GWT Incubator)

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