Show TOC

Creating ActionsLocate this document in the navigation structure

Context

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:

Procedure

  1. In the configuration script section for actions, create a <Context> element for a standard folder that indicates the start of actions, with the following attributes:

    <context name="actions" objectClass= "com.sap.portal.pcd.gl.GlContext">

  2. In the actions <context> element, create a <Context> element for each action:

    <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.

  3. Inside the <Context> element of each action, add <Attribute> elements to configure the action. You can add the following attributes:

    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:

    • When, at the end of a wizard, an administrator selects to open the newly created portal object for editing

    • When opening an object in another object, such as an iView in the page editor

    Integer between 0 to 100

    Note

    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>
                   
  4. Inside the action <Context> element, add a <Context> element that creates a delta link to the work unit to be run when the action is selected.
    Note

    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:

Results

The specified actions are displayed when you right-click an object in the Portal Catalog.