activatedAdded by IBM on October 10, 2012 | Version 1 (Original)
|Specifies whether an item, page, or form is currently activated by the user or not. This option is usually set by an external program such as a parser, but under certain circumstances can be set by computes in the form. Tags: activated option, options, items, action item, button item, cell item, combobox item, popup item, page global, form global, XFDL, 8.0, spec
The activated option for an item can be set by a compute if the item is an action, button or cell utilized on the current page. The activated option must be set to either on or off and the item must be capable of being activated. Cells that are not grouped with a popup, combobox or list on the current page cannot be activated. Buttons that are not visible cannot be activated.
This option is not saved or transmitted as part of the form. Instead, it is automatically created each time the form is read into memory, and is maintained only during display or processing.
Table 1. activated properties
|status||on||item, page, or form is currently activated by user|
|off||item, page, or form is not currently activated by user|
|maybe||button only: item might be activated, as user has pressed it, but has not yet released it|
Available in action, button, cell, combobox, popup, page global, form global
Example The following example shows a button that changes color when it is activated:
The button will appear white when the user activates it, and gray otherwise.
The following example shows how the activated option can be set for an item based on user input. This use of the activated option works with the keypress option to establish a default button on the form.
<bgcolor compute="toggle(activated, 'off', 'on') == '1'
? 'white' : 'gray'"></bgcolor>
When the user presses the ESC key (which is not processed by any item on the form), the activated option for the button will be set to on and the button will fire.
<custom:myoption compute="toggle(global.keypress, '',
'ESC') == '1' ? set('activated','on') :
- Default: off
- Activated is set to on when an item is activated, and remains on until any transaction initiated by the item is properly under way. For example, in a print button, activated will be turned on when the user initiates the print action, and will remain on until network results indicate the print action is taking place.
- The activated option is not included in form descriptions that are saved or transmitted.
- Specific details on activated behavior for each item:
- action — actions set activated to on when they fire, and off when the transaction they initiate is under way.
- button — buttons set activated to maybe when the user holds the mouse pointer or space bar down on the button. They set it to on if the user releases the pointer or space bar while over the button, and they set activated to off when the transaction the button initiates is under way.
- cell — cells behave in the same manner as buttons. In the split second during which a user selects a select type of cell, it sets activated to on. It turns activated off as soon as the action of being selected is finished. Cells that initiate network transactions set activated to on from the beginning of the request to the time when the request produces results. Note that there is no maybe status for a cell.
- combobox and popup — comboboxes and popup lists set activated to on when their lists are popped open, and off when the lists are not open. Note that the "field" portion of a combobox does not register an activated setting.
- page — a page sets activated to on while it is open, and off when it is not. A page can be open and activated even when the form is minimized (not actively on screen).
- form — a form sets activated to on while it is open, and off when it is not. A form can be open and activated even when it is minimized (not actively on screen) .