Skip to content

WaveConnector for GWT: Local Testing and Turnkey Gadget Development

by Jonas Huckestein on February 10th, 2010

Hello everybody, today I announce my first open source publication :D I’m excited so please leave comments and let me know what you think or if you run into problems :)

Introducing WaveConnector for GWT 0.0.1

WaveConnector allows you to develop Google Wave gadgets and to test them locally in hosted mode! Head over to the project site at Google Code for more info.

The turnkey archive that is provided on the project site has everything you need to get started! It already contains the little project I made for the tutorial last week, so you can just downloaded the waveconnector-gwt-turnkey archive and start from there. There is no need to download anything else. Hit the jump for a really short How-To that’ll get you going in no time.

And now… a screenshot of our WaveListGadgetGWT running inside a hosted mode browser!

WaveListGadgetGWT running in GWT hosted mode!

Update: Apparently the old gwt-gadgets gadget linker for GWT does not support power features such as code splitting and resource bundles. This is not acceptable. I am currently looking into whether its possible to use the xs linker instead. In that case the communication with the gadget js api would have to be reimplemented (or maybe taken from gwt-gadgets).


Really Short How-To

Make sure to have the latest Google Plugin for Eclipse installed.

  • Download the turnkey archive (you don’t have to extract the zip)
  • Select File -> Import
  • Select “Existing Projects into Workspace” from the import dialogue
  • Select “From archive file” and choose the turnkey archive you downloaded earlier
  • Click Finish. You now have three projects in your workspace.
    • GadgetTester is used to test your gadget in hosted mode
    • YourWaveGadgetDeployment is the project that compiles to the actual wave gadget
    • YourWaveGadget is the project that contains the GWT code for your gadget.
  • To test the Gadget locally, run the GadgetTester. It will load YourWaveGadget in a hosted mode window
  • To deploy, I suggest you just deploy YourWaveGadgetDeployment to the AppEngine. Otherwise you can compile it and upload the war/yourwavegadgetdeployment folder wherever you want.
  • I have deployed the turnkey gadget to if you’re interested

Feel free to ask questions how all this works. Some might also be answered on the project page (including: “Why is this great?!”). I haven’t gotten around to really documenting things yet.

FAQ/Tips and Tricks and Random Notes

Taken from the project page.

  • All code is released under the MIT License
  • If your refactor stuff, make sure to adjust the module definitions. Eclipse doesn’t update them.
  • The YourWaveGadgetDeployment project has AppEngine nature for easy deployment. This is not really required and you can remove the dependency.
  • All events will run through the injected eventBus. Do not try to attach handlers to the Wave object. This is the core difference from the JS wave API.
  • If you want to understand the dependency injection going on, note how the GinModules in the different projects inherit from one another.
  • If you add classes to your main YourWaveGadget project that need to be injectable (like sub-widgets that need to be created by a provider), keep in mind to add them to
  • Use the Wave objects log function to log messages that are visible in the wave sandbox
  • You can cut the compile time of your gadget (because you will still be deploying it often) by adding something like <set-property name=”user.agent” value=”safari” /> to your module xml. (replace safari with your browser)
  • All gadgets make use of the DynamicHeight feature. If you want to adjust the Gadget’s height to fit the content fire a GadgetUpdateEvent on the eventBus.

That is all.


I just sort of pushed this out on my own, but really there were some other people have helped me.

  • Most importantly, Hilbrand Bouwkamp and his superb cobogwave library for GWT on which WaveConnector immediately builds up on.
  • Once again Alex Moffat over at Lombardi who first gave me the idea of creating Wave Gadgets in GWT.
  • Everyone at Google for their superb tools ;)

What Now?

I should probably document things and I’m also planning to add some features. Most importantly I want a UI to manage the simulated wave’s participants and perhaps even the option to switch the “perspective” of the gadget to that of another user (maybe even side-by-side).

So although it’s not 100% done, I felt this might be a great share for some people and I think that this is the closest we can currently get to comfortably developing wave gadgets in GWT. Also, now you can take any GWT application (restrictions on rpc calls and such apply ;))  and make it into a wave gadget.

Please leave a comment if you liked this and tell your GWT coding friends :) Developing for wave is really fun!


Related posts:

  1. A Wave Gadget + Robot using GWT 2.0 and Google App Engine, Part 1

From → Coding

  1. hiperion permalink

    All it’s ok!!!
    YourWaveGadget can be a Web application project like the default project created in eclipse with the plugin of google?
    In this case there the project contains GWT code but this code isn´t GWT UiBinder.

  2. Hi there, I’m not sure I understand what you’re saying.

    YourWaveGadget already has web application nature as per the Google Plugin for Eclipse.

    The example project also contains GWT code (with UiBinder).

    What YourWaveGadget doesn’t have is AppEngine nature. That means no server-side code can be added to YourWaveGadget.

    Cheers, Jonas

  3. hiperion permalink

    Hello, ok, perhaps for that when I deploy the gadget in google waves I get this error: access denied (java.lang.RuntimePermission accessDeclaredMembers)

    It happend when I do a rpc-proxy call. What do you think?

    Cheers, Andrés.

  4. Vega permalink

    Regarding Wave Connector – it’s very nice! :)
    There’s 2 things I miss however:
    1)Compatibility with cobogwave – i.e. The Wave interface to extend WaveFeature
    2)API to fire custom events – like fireCustomEvent(String jsonEvent). It would allow to copy outgoing robot event from the GAE log and then fire it locally for debug purposes.

  5. I see a lot of interesting content here, i know writing articles is time
    consuming, but i know unlimited source of content for
    your page , just type in google – rewriter creates an unique article in a minute

Trackbacks & Pingbacks

  1. [Google wave] 10 nouveaux articles; 10 nouvelles façon pour apprendre les API de Gwave

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS