data (option)

Associates an action, button, or cell item with a single data item. The data option is valid only in items with a type setting of enclose, display, extract, or remove.

Syntax

   <data>data item</data>
Table 1. data parameters
Parameter Type Description
data item string The item sid of the data item to associate with the action, button, or cell.

Available in

action, button, cell

Example

The button under is an enclosure button associated with a single data item.

   <button sid="encloseImageButton">
      <value>Update Image</value>
      <type>enclose</type>
      <data>displayImage</data>
   </button>

If a user enclosed another file, then the data item referred to in the button's data option would be replaced with the new data item. (The data item would use the same item sid; the one that is referred to in the data option.)

Usage details

  1. Default: none
  2. A data option specifies only zero or one data items.
  3. If an item with a type setting of enclose and a data option is used to enclose a second data item, then the second data item will replace the first.
  4. If an enclosure mechanism is used to replace an image stored in a data item with a new image (see previous statement), then buttons and labels whose image option is set to the identifier of the image data item will be updated to display the new image.
  5. A data item referred to in a data option might also have a datagroup option and thus belong to the datagroups of other actions, buttons, or cells.