Nexaweb Macros

Macros provide a way to associate a name with a group of valid Nexaweb page instructions (XModify, MCO, data, and so forth) that the Nexaweb platform loads into memory and executes at any time.

When used to develop client side logic, macros provide the following benefits:

When using macros, keep in mind the following:

For more information on macros, see the Nexaweb Platform documentation.

To use the Nexaweb Studio Macro wizard to create a Macro, follow these steps:

1. To start the Macro wizard, with a UI file open in the Nexaweb perspective, either:
- Select
Tools > Create Macro.
- Right click in a UI file and select New > Macro.
- Click image\img00371.gif, the Macro wizard icon in the toolbar.
Note: To make the Macro wizard icon available on the Nexaweb Studio toolbar, you must add the Nexaweb Advanced Formatting tools. See Nexaweb Studio Toolbars.

The Macro wizard appears.

2. Begin defining the macro as follows:

image\img00372.gif

Figure 33: New Macro wizard.

Macro Name: Specify a unique name for this macro. (If you create a new macro with the same name as an existing macro, the new macro overwrites the old one.)

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 Actions:

modifications defines a new macro.

macroCall Specifies tags in the UI to execute an existing marco.

execute Specfies an MCO event call to an existing macro.

Either:

- Double click on an action, or

- Select an action and click Add.

The selected action appears in the Defined Action list box.

See the following sections for: modifications, macroCall or execute to complete the macro wizard.