Positioning Attributes for Actions or Submodels
Parameter
Possible Values
Req?
Description
Position of the action or submodel
insertAt: Specifies the absolute position at which the action must be inserted in the Action menu. Depending on access permissions, the position at which the action is displayed might vary for some users if any of the actions before this action is hidden in the UI.
insertBeforeActionName/insertBeforeObjectType: Specifies the action immediately before which the custom action should appear.
insertAfterActionName/insertAfterObjectType: Specifies the action immediately after which the custom action should appear.
No
A set of attributes can be used to specify the position of your custom action in the Action menu. You can use only one position attribute for a given action. Specifying position is optional. If the position is not specified, the action will be inserted at the end of the action model.
For example: <action name="print part" type="part" insertAt="6"/>
If any conflicts occur while determining the position within the resulting action model, the action is placed at the end of the action model. If multiple custom actions are added and more than one action encounters a position conflict, the position of all such actions will depend on the order of registering the custom action model file in the com.ptc.netmarkets.util.misc.customActionModels property.
Key points about position attributes:
Use position attributes only when the model definition has an incremental attribute.
Use position attributes only for custom actions or submodels being added in existing action model definitions.
Do not use position attributes for an action or submodel which is already in the list of action model defintion. Re-ordering OOTB actions in an action model is not allowed.
Only one of these position attributes can be used on an action or a submodel: insertAt, insertBeforeActionName and insertBeforeObjectType, or insertAfterActionName, and insertAfterObjectType.
Action names and object types are used in correct combinations in position attributes: insertBeforeActionName and insertBeforeObjectType or insertAfterActionName and insertAfterObjectType.
Action names and object types specified in the position attributes are valid. These could be out-of-the-box types and actions, newly defined actions, or submodel names. The insertBeforeObjectType or insertAfterObjectType attributes are empty for submodels.
If separator value is specified in the insertAfterActionName or insertBeforeActionName tag, it will be ignored and inserted at the end to avoid any conflicts. An action list of a model can have multiple separators defined.
Sample Code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE actionmodels SYSTEM "customactionmodels.dtd">
<actionmodels>
<model name="psbDescribedByDocsToolBar" incremental="">
<action name="acmePartAddDescribedByDoc" type="acme"
insertBeforeActionName="psbAddDescribedByDoc"
insertBeforeObjectType="psb" />
<action name="acmePartCreateDescribedByDoc" type="acme"
insertAfterActionName="psbCreateDescribedByDoc"
insertAfterObjectType="psb" />
<action name="acmePartRemoveDoc" type="acme" insertAt="6" />
<submodel name="partDescribedByDocsTool" insertAt="7" />
</model>
</actionmodels>
Was this helpful?