This page contains some notes and guidance on how to build widgets that can be hosted in the Wookie Server.

Tutorials

You will probably want to look at the tutorial found in http://svn.apache.org/repos/asf/incubator/wookie/trunk/tutorials/

More specifically the slides in this open office presentation will walk you through the creation of your first widget.

Widget source directory

Widgets should be developed in trunk/widgets/WIDGET_NAME, where WIDGET_NAME is the name of the widget being developed.

This directory contains widget sourcecode and build files.

Create a widget

To create a widget:

cd $WOOKIE_HOME/widgets
ant seed-widget

This is an interactive target that will ask you a number of questions
about the widget you wish to create. The first question asks for a
short name for your widget. This short name is used as the name of the
widget directory and other key widget. For the rest of this document
WIDGET_SHORTNAME will refer to your response to this question.

Once the target has completed your widget skeleton will be available in
a directory called WIDGET_SHORTNAME.

The default widget will provide a very basic widget with default style
resource and javascript files.

Build a Widget

cd $WOOKIE_HOME
ant build-widget

You will be asked the name of te widget to build. After a succesful build your widget package will be created in the /build/widgets directory.

Note, you can also run ant from the widget directory, in which case you will
be asked for the shortname of the widget you wish to work with.

Deploy a widget

cd $WOOKIE_HOME
ant deploy-widget

You will be asked the name of te widget to build. Your widget will be hot deployed and you can use it immediately (note the server must have hot deploy turned on for it to see the new widget).

Automatically deploying at build time

Widgets will automatically be deployed at build time by default. That is, any widgets found in the widgets directory will be deployed to the webapp when it is rebuilt. you can configure which widgets will be deployed in your local.build.properties files.

Third Party Materials

This section links to third party materials about building Wookie Widgets.

Thomas Ullmann

Thomas has created some screencasts you can follow:

Creating widgets - Note that this screencast demonstrates how to build widgets manually, the presentation above describes how to use the templates to get started faster.
Uploading widgets - Note that this is made against an older version of Wookie, whilst uploading is correctly documented, the method for previewing widgets is incorrect. To preview a widget click the "demo" link in the widget gallery.

  • No labels