vdl-action-group
A named container for VDL actions. You are required to wrap VDL actions in an vdl-action-group and this gives the chain of actions a name that can be referenced in vdl-events or other vdl-actions.
Example
<vdl-var name="selectedCity" value="New York"></vdl-var>
<vdl-var name="selectedMonth" value="May"></vdl-var>
<vdl-action-group name="increaseSupplyAction" description="Increment the supply value">
<!-- Get current supply value -->
<vdl-action command="=scenario.entities.FactorySupply([vars.selectedCity, vars.selectedMonth]).value"></vdl-action>
<!-- Increment supply -->
<vdl-action-update-entity entity="FactorySupply" value="=value + 1" indices="=[vars.selectedCity, vars.selectedMonth]"></vdl-action-update-entity>
<vdl-action-execute mode="CALCULATE_INCREASED_SUPPLY"></vdl-action-execute>
</vdl-action-group>
<vdl-button vdl-event="click:actions.increaseSupplyAction">Increase Supply</vdl-button>
Attributes
name | A unique name to reference this VDL action group from vdl-events or other vdl-actions. The name can only contain characters that are valid for JavaScript function names, i.e. it can't contain hyphens (-) | required | |
---|---|---|---|
description | A description of the VDL action group. This has no affect within the VDL view but provides a way to self-document the VDL action group when sharing VDL files or authoring views within View Designer. | ||
namespace | Custom namespace that this VDL action group can be referenced from. This is optional and will default to "actions". This is an advanced option but can be useful to avoid VDL action group name clashes when sharing action group definitions with VDL includes. |