An action is a menu item that is displayedin the context menu of an object in the Portal Catalog. The action is tied to a work unit, which is run when the action is selected.
An action is defined in the XML script as any semantic object. The following figure illustrates how to create an action:
<context name="actions" objectClass= "com.sap.portal.pcd.gl.GlContext">
<Context name="new" title="New" objectClass="com.sap.portal.admin.studio.config.action">
You can also create action submenus by adding <Context> elements for folders.
Attribute Name |
Description |
Valid Values |
---|---|---|
eventType |
Indicates whether to open the work unit in a new window. |
WorkUnit NewWindow |
required.objectTypes |
Indicates the object types for which to display the action. |
Object class for the object types for which to display the action. Specify multiple object types by defining multiple <AttributeValue> elements. |
required.permissions |
Indicates the object permissions that the administrator must be granted to view this action. |
admin_read admin_owner admin_read_write end_user |
required.subTypes |
Indicates the object subtype for which to display the action. The subtype is indicated by the com.sap.portal.pcm.admin.subType in a portal component's portalapp.xml file. |
String |
aspects |
Indicates the UI location of the action. By default, it is the context menu of the Portal Catalog tree. You can also define multiple locations, such as What's Next wizard pane or context menu of the Detailed View . |
com.sap.portal.adminstudio.browse (context menu of the Portal Catalog tree) whatsNext ( What's Next pane of the object's wizard) com.sap.portal.detailed_view (context menu of the Detailed View ) |
defaultActionRank |
Determines whether the current action is the default for a specified portal object. For each portal object, the admin studio framework determines the available actions. The default is the available action with the highest rank. The default action is triggered:
|
Integer between 0 to 100 |
All of the above attribute names must be preceded by com.sap.portal.admin.studio.config.action .
To override a multivalue attribute of an action, defined in the action template, by the one you create, use ModType= replace . Otherwise the attribute values will be added to those defined in the action's template.
For example:
<Attribute name = "com.sap.portal.admin.studio.config.action.required.objectTypes" ModType="replace"> <AttributeValue value = "com.sapportals.portal.resolving.rule"/> <AttributeValue value = "com.sapportals.portal.desktop"/> </Attribute>
The above procedure describes how to create actions directly in the admin studio configuration script. You can also create an action outside it, and then create a delta link to the action in the admin studio configuration script.
The following figure illustrates how to create a delta link to an existing action defined outside of the admin studio configuration:
The specified actions are displayed when you right-click an object in the Portal Catalog.