Focus Rule

   MaestroThe UI design product.  |   Form Builder |  All versions This feature is related to all versions.

Maestro allows you to run a script when a component gains focus.

Create a Focus Rule

To create a Focus rule:

  1. Inside the Maestro Editor, select a component from the View pane.
  2. In the Properties pane, click the Create Rule button.
  3. Click the Focus link, located under the Action heading.
  4. Define the JavaScript-based logic of the rule within the code editor. As an Action rule, the Focus rule does not need to return anything. It simply performs an action, such as opening a dialog or triggering another rule.
  5. Click Save.

The rule will appear in the Properties pane, under the Rules heading.

Note

You can only attach one rule of each type to a component.

Action Rules

There are 4 types of action rules:

For a complete list of rules, refer to List of Maestro Rules.