Applying a Dojo widget to a control

Once Dojo resources are available on an XPage, you can apply them to controls.

About this task

To apply a Dojo widget to a control such as an edit box:

Procedure

  1. Put focus on the control.
  2. Select Dojo on the Properties tab.
  3. Set Dojo type to the name of a Dojo module resource, for example, dijit.form.NumberSpinner.
    Under All Properties, this is dojoType.
  4. To set an attribute value:
    1. Click the Add icon.
    2. Specify the name of the attribute, for example, value or smallDelta for dijit.form.NumberSpinner.
    3. Specify the value of the attribute, for example, 100 for value or 5 for smallDelta in dijit.form.NumberSpinner.
    Under All Properties, this is dojoAttributes.

Results

If you save and preview dijit.form.NumberSpinner applied to an Edit Box control, you will see up and down arrows (the spinner) on the side of the edit box. The initial value of the edit box is the value attribute. When you click the Up and Down arrows, the value increments and decrements by the smallDelta attribute.