Create an Action Editor
An Action Editor is a dialog box that lets you set some of the parameters of a save action. You can create an Action Editor for your custom save action.
Before creating an Action Editor, refer to the Sitecore Developer Network website for information about XML controls and an XML application.
The Action Editor uses the following working logic:
-
It reads save action parameters in the
OnLoadmethod. -
It shows save action parameters to the user.
-
After the user has edited the parameters, it saves them to the Save Actions field of the web form using the
OnOkmethod.
Before implementing the Action Editor, you should familiarize yourself with the following code tips:
-
To get current save action parameters:
-
To save parameter values, override the
OnOkmethod: -
To get the current web form item ID:
-
To get the current language:
-
To get the current Sitecore database:
To create an action editor:
-
Create an XML file that contains the dialog layout:
-
Create an action editor class based on the
Sitecore.Web.UI.Pages.DialogForm. Specify the created class asCodeBesidein the XML file. The following code sample is for the action editor class: -
In the appropriate Save Action item, in the Editor field, specify the editor that you have created.