If you added modifications to the Defined Action list box, the slider bar to the right of the Defined Action list box becomes active.
To complete the modification, follow these steps:
1. Click the slider bar to the right of the Defined Action list box.
The list box on the left of the dialog changes to Available Operations and displays a list of XModify commands.
|
Figure 42: Avaialble Operations. |
Document: Leave blank for the specified XModify command to execute against the UI document. Or specify the name of another document - for example, a data document - against which to execute this XModify command. Available Operations: Select an XModify command and click Add. The command you selected appears in the Defined Operations list box. The tab at the bottom of the dialog displays the XPath Query builder for the selected command. |
3. Specify the XPath query syntax:
|
Figure 43: XPath Statement.
Figure 44: Build Xpath Expression Dialog |
XPath Query: Either enter the XPath expression to select the location in the document where you want the XModify command to execute, or click the button to the right of this field and the Build XPath Epression dialog appears as shown in Figure 36. To use the Build XPath Epression wizard, click + beside a component in the list to expand it. Click on the component name to see a list of attributes for that component to select. Finally, click in the checkbox beside the lowest component or attribute that you want to select and an expression selecting that path appears in the XPath field at the bottom. Click OK to select this path and close the dialog. Data to append: Specify the XML-formatted data or UI components for this XModify command to act on at the selected location in this document. |
4. Click Next.
The Configure Macro Parameters dialog appears.
5. Specify attributes or parameters for this XModify statement as follows:
|
Figure 45: XPath Statement. |
Click the value field for any element attribute whose value you want to specify. |
6. Click Finish.
Nexaweb Studio adds the complete macro to the Source of the selected file. The Macro appears in the Outline view.
6. To view the file, click the Visual Editor Source tab. The macro appears similar to the following, for a parameterized macro:
macro:macro xmlns:macro="http://openxal.org/core/macro" name="defaultMacro1">
<macro:macro xmlns:macro="http://openxal.org/core/macro" name="defaultMacro">
<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
<xm:set-attribute select="/xal/freePane">
<xm:attribute name="backgroundColor" value="white"/>
</xm:set-attribute>
</xm:modifications>
</macro:macro>