Hi Laurent,

One key point to have your GWT application working as an OpenSocial (or
plain vanilla) gadget is to use the cross-site script (-xs) as mentioned in
Didier's presentation on slide 20.

Specifically, you would need to generate the -xs version of your application
bootstrap file and use that instead of the normal bootstrap script to load
your application in a cross-site fashion. It's worth noting that Didier's
slide deck is a little dated and is working with GWT 1.4.

In GWT 1.5, there are a couple of changes to note that should make things
easier to write your GWT gadget:

1) To generate the cross-site bootstrap script, simply add the xs linker in
your module XML file:

<module>
<inherits name="com.google.gwt.core.Core" />
<add-linker name="xs" />
...

The generated files will now be cross-site load enabled. The bootstrap
script filename will still be what you expect
(com.domain.subdomain.MyModule.nocache.js).

2) The Google API Libraries for GWT project provides support for writing
Gadgets with GWT, with some caveats (see issue tracker link below). There
currently aren't any bindings for OpenSocial, but exploring the code for the
current Gadgets support should lead you to find an easy way to incorporate
OpenSocial functionality into your gadget. You could also use JSNI to
interact with the OpenSocial APIs directly in JavaScript.

Some open issues regarding GWT for Gadgets:
http://code.google.com/p/gwt-google-apis/issues/list?can=2&q=API%3A+Gadgets&sort=-api&colspec=ID+Type+API+Status+Priority+Milestone+Owner+Summary&cells=tiles

Hope that helps,
-Sumit Chandel

On Fri, Nov 21, 2008 at 12:37 AM, Laurent Bois <[EMAIL PROTECTED]>wrote:

>
> I saw my problem with inspector in Safari...
> Problem comes from the cache.html files displayed in iFrame , and
> loaded from the url http://sudoracegadget.googlecode.com/svn/trunk/....
> whereas the Gadget itself is running in an OpenSocial container with a
> different domain :
> - on iGoogle , URL being 47.gmodules.com
> - When testing , www.gmodules.com
>
> I understand well the Javascript for  an OpenSocial gadget could be
> self contained in the Gadget XML file, and in this case no problems.
>
> So my question is :
> With a more complex GWT application (as the StockWatcher exemple from
> the Google GWT tutorial ), having dependencies to HTML artifacts...
> are there tricks to make it run as a (OpenSocial) Gadget
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
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