MaestroThe UI design product. | Form Builder | All versions This feature is related to all versions.
Maestro allows you to create new and update existing rule helpers for components using Component Options. You can use these rule helpers to add methods to a component right click event in the rule editor, so a rule helper will appear as a selectable option. Also, rule helpers are for when you right click on a component when writing a script, it gives you pre-defined actions relating to that object, for example, if you right click on a dialog, it has an option Open Dialog.
To create a new rule helper using Component Options:
A JavaScript can follow this pattern: Form.fireRule ("name of the Component Template", Form.items.component_ID, data)
, for example,
Form.fireRule("testRule", Form.items.componentRuleTestID, data);
.
In this example, testRule
is the name of the component rule template and componentRuleTestID
is the component ID of the component that the rule helper is associated with. When a user right-clicks the component with the component ID componentRuleTestID
, this rule helper becomes available as a selectable option.
You can use the insert-item
keyword to reference the item selected from the tree, so it populates it with component's ID.
The example of the insert-item
is shown below:
"ruleHelpers": [
{
"label": "Open Dialog",
"name": "openDialog",
"value": "Form.showDialog(\"insert-id\")"
},
]
Next, learn how to add rule templates.