Dojo Widget

Implementation of any dojo widget as a tapestry component. The formal parameter dojoType is used to determine which dojo widget to create. Informal parameters are used as javascript properties to create widget with. Please have a look into the for further information about the widget properties. A simple example is the dojo Clock widget:

<div jwcid="@dojo:Widget" dojoType="Clock" timeZoneOffset="5" labelColor="#fff"/>

The formal parameter isContainer allows a widget to have children. All the widgets within the body of a container are added as childs. For example dojo tabs:

<div jwcid="@dojo:Widget" dojoType="TabContainer" isContainer="true">
   <div jwcid="@dojo:Widget" dojoType="ContentPane" label="Athens">Athens</div>
   <div jwcid="@dojo:Widget" dojoType="ContentPane" label="Moscow">Moscow</div>

DojoWidget allows you to connect any client side event to a listener method. Please see the dojo api for further information about the events fired by the particular widget. To connect a client side even just use the informal parameter with the corresponding name. For example, specifying a component definition such as:

<div jwcid="@dojo:Widget" dojoType="..." onClick="listener:onClick" onMouseDown="listener:onMouseDown"/>

Furthermore it is poossible to connect a client side event to a javascript function. For this purpose use the prefix callback. For example:

<div jwcid="@dojo:Widget" dojoType="SliderHorizontal" onValueChanged="callback:sliderCallback"/>

Whereby sliderCallback is a javascript function:

function sliderCallback(value) {