Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Available since version Paper Plane 11.0.

This example shows how to create a contextual button on a Analytics chart rendered in a dashboard portlet. Clicking the button will result in creation of a new Action Item with a given Action Item Type, and with provided values.

Note: This button is visible only when you move your mouse over the chart.

To configure a Contextual Action, go to Advanced Configuration Options, and add a new application property:

  • The name must start with prefix “pfxContextualAction_”, for example “pfxContextualAction_DashboardAction”.

  • The property contains the following JSON value:

{
    "name": "actin_create_simple_action_from_dashboard",
    "labelTranslations": {
        "": "Create Action"
    },
   "page": "dashboardPage",
    "order": 0,
    "contextLinking": {
        "targetPage": "newActionPage",
        "targetPageTarget": "new",
        "targetPageEntityType": "ActIn_DashboardSimpleAction",
        "targetPageInputs": {
            "sourceContext" : {
                "ContextLinkingButton_DashboardName": "{dashboardName}",
                "ContextLinkingButton_PortletName": "{portletName}",
                "ContextLinkingButton_DashboardPortletPreference": "{dashboardPreference}",
                "ContextLinkingButton_DashboardInputs": "{dashboardInputs}"
            }
        },
		"targetPageFields":{
			"originatorTypedId": "{dashboardTypeddId}",
			"summary": "{dashboardName}-{portletName}-action",
			"description": "This action was created from dashboard {dashboardName} with portlet: {portletLabel}"
		}
    }
}

Replacements will be changed when the system creates the button on an actual page in frontend. See also a list of available placeholders for dashboardPage.

For details on context linking parameters, see Context Linking.

  • No labels