|Form Data Model: _getActions|
|CALL SEND (model-id, '_getActions', actions, map, row-addr, col-addr);|
||N||specifies the identifier of an SCL list that will contain the pop-up actions to be displayed.|
|This list is initially filled with the viewer's actions. To add model items, insert the model actions into this list. The model can add and delete items in this list if corresponding changes are made in the map.|
|The items in the actions list are not named. The value for each item is the text that will be displayed in the pop-up. Turn on the INACTIVE list item attribute for items that should be in the pop-up but should be grayed.|
||N||specifies the identifier of an SCL list that will contain the current map of pop-up actions to objects and methods.|
|This list is initially filled with the viewer's map. To add model items, insert the model map into this list. The model can add and delete items in this list if corresponding changes are made in the actions.|
|For each item in actions, map should contain two items:|
|1) the object identifier to which the action method should be sent|
|2) the name of the method to be sent to the object identifier.|
|The items in the map list are not named. The model's identifier should precede the associated method name. Note that methods that require arguments cannot be called from the pop-up.|
||N||specifies the row coordinates list of the cell that contains the pop-up event.|
||N||specifies the column coordinates list of the cell that contains the pop-up event.|
The pop-up displayed by the viewer is a combination of items that the viewer puts on the pop-up and items obtained from the model on a call to the _getActions method. When a pop-up occurs, the _getActions method is called by a viewer connected to a model in order to retrieve the items that the model wants placed on the pop-up list.
Note: For every item added to the actions list, you must add two items
to the map list. See the description of map in the previous table
for more information.
In the following example, the _getActions method is implemented for
a model subclass of Form Data Model, such as Data Set Data model, to add two
Add Row and
Copy Row to the pop-up
Copy Row is grayed. In this model subclass, the
_addRow and _copyRow methods are supported.
GETACT: method actions map row col 8;
call super(_self_, '_get_actions_', actions, map, row, col);
actions = insertc(actions, 'Add Row', -1);
actions = insertc(actions, 'Copy Row', -1); setlattr(actions, 'INACTIVE',-1);
map = insertn(map, _SELF_, -1); map = insertc(map, '_addRow', -1);
map = insertn(map, _SELF_, -1); map = insertc(map, '_copyRow', -1); endmethod;
For the Data Set Data Model subclass, you would not have to add
Add Row or
Copy Row to the actions list; they are already defined.
Add Row and
Copy Row are used in this example
to illustrate how you would add your own user-defined actions and methods.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.