Java Reference
In-Depth Information
The contents of the widget descriptor gives the WidSets run-time envi-
ronment all the information needed to create and manage the application
within the defined lifecycle for widgets. The root element ( <widget> )
defines the version of the specification being used, as well as grouping
all the information for that particular widget. This information is divided
into several sections, of which the following are mandatory:
The Info section describes the widget's metadata, such as the name,
version, author's name, and a short description.
Parameters are a set of dynamic containers for settings-related data.
They can be used in widget.xml , to configure properties for the
widget, or in code. For example, if we configure two parameters,
MyServiceURL = and color = black ,they
can be used in widget.xml and in code to determine the location
of the feed you want to read and the color of labels. You can specify
that certain parameters controlling widget properties are editable.
This means that they can be changed by the end user to suit the
widget to their own needs, by clicking Options, Widget, Settings.
Settings defined in parameters are persistent; their values are saved to
the server when closing the WidSets client, and then retrieved when
reloading the widget, so no changes are lost.
The Resources block holds values for images, stylesheets and WSL
source code used by the widget. In this example, only the source code
and stylesheet elements are used.
The Layout section defines the views that display data retrieved from
the web services to the user in a format defined by the developer. There
are two possible values for the elements enclosed by <layout> : view
defines the charateristics (background image, positioning, labels, etc.)
of the widget's views on the mobile client; and webview is used for
positioning and images when the widget is seen in its minimized view
on the web dashboard manager. Our example defines three views:
viewMini, the minimized widget view on the mobile dashboard;
viewMaxi, used when the widget is opened in its maximized view,
and the webview, used to display a label with the widget name on
the web dashboard manager.
A.3.3 Creating Widget Source Code
Having created the application descriptor, let us now proceed to creating
the source code which handles the interaction between users and the
widget itself. Using your favorite text editor, create the helloworld.he
file containing the following code:
Search WWH ::

Custom Search