data (item)Added by IBM on October 10, 2012 | Version 1 (Original)
|Stores an information object such as an image, a sound, or an enclosed file in an XFDL form.
Whenever any of these objects are added to a form, the data that describes the object is stored in a data item. A data item can only store the data from a single object. Data in data items must be encoded in base64, base64-gzip or XML format.
Data items are created automatically when files are enclosed in a form. Enclose files using items with a type option setting of enclose.
Available options datagroup, filename, filesize, itemnext, itemprevious, mimedata, mimetype
Example This is an example of a data item.
- Stores the data in the mimedata option, and the data's MIME type in the mimetype option.
- If a data item contains a datagroup option, it can be associated with one or more other data items. Data items with a datagroup option are not replaced if a button or cell of type enclose point to new data items. The new data items simply become members of the same datagroup. Additionally, buttons and cells with the same datagroupoption can access the contents of the data item.
- If a button or cell of type enclose contains a data option that points to a data item (as opposed to using the datagroup option), then special rules apply to the data item's behavior. If a user encloses a new data item using that button, the new information overwrites the old. For example, if the data item originally contained a jpeg image of a dog, and then a user enclosed a png image of a house, then the data item's mimedata, mimetype, and filename options update themselves to contain the information about the house image.
- Starting with XFDL version 4.5, data items are the only items that can be filtered using the signdatagroups and transmitdatagroups options.
- The filesize option is created by the XFDL processor when an attachment is added to the form.