Command Targets and Restrictions

Commands perform operations on view objects. Each command type can only target specific objects:

  • Any panel: showPanel , clearPanel
  • Form panel: saveForm , clearForm , deleteRecord
  • Form document field: checkInNewDocument , checkInNewDocumentVersion , checkOutDocument , showDocument , lockDocument , deleteDocument
  • Grid panel: deleteSelectedRows
  • Tab panel: selectTabPage , createTabPage
  • View panel: loadView
  • Dialog window: openDialog , closeDialog .

Most commands, regardless of their target object type, can apply standard Web Central restrictions (instances of Ab.view.Restriction ) to their targets. All Web Central view objects (panels, tab pages, dialog windows, workflow rules) have built-in restriction support. Most commands can have the following "standard" properties:

Property name Description Default value
target Target window or frame on which the command will operate. In 2.0 viewsframes are typically used only to include legacy views (XSL-based or MDX) or third-party web content into dashboards. This window.
panelId Target panel id on which the command will operate. No value. If the command uses this property, it must be explicitly specified.
applyParentRestriction If true, the command will apply a restriction applied to its parent panel, to its target (panel, tab page, dialog window, or workflow rule). True.
applySelectionRestriction If true, the command will apply current grid row restriction (row primary key values) to its target. True, for commands that are defined in grid panel fields.
applyMultipleSelectionRestriction If true, the command will apply the multiple-selection restriction (containing primary key values of all selected rows) to its target. True for commands that are defined in grid panels with multiple selection enabled.
clearRestriction If true, the command will not apply any restriction, and will also clear any restriction previously applied to its target. False.

Commands that are defined in form panels always apply the restriction assembled from the current form field values (obtained by calling Form.getFieldRestriction() ), in addition to the parent panel restriction (if specified by the applyParentRestriction property).

Commands that are defined in grid panel fields of type button or link can only apply the current row primary key restriction (if specified by the applySelectionRestriction property), and no other restriction.