Skip to main content
Version: 7.9

Template Canvas Scripting Functions

This page details the various component and extension functions available for Vision's Template Canvas component.

Component Functions

.getAllTemplates()

  • Description

    • Returns a list of the templates that comprise the template canvas.
  • Parameters

    • Nothing
  • Return

    • List - A list of VisionTemplate definitions. Each instance in the canvas will return it's definition's name. The names of each instance can be accessed with getInstanceName(). Individual components in each instance can accessed with getComponent().
  • Scope

    • Client

.getTemplate(name)

  • Description

    • Obtains the designated template object from the template canvas.
  • Parameters

    • String name- The name of the template as defined by the "name" column of the dataset populating the template canvas.
  • Return

    • VisionTemplate - Returns the template instance. Properties on the instance can be access by calling .propertyName
  • Scope

    • Client

Extension Functions

initializeTemplate

  • Description

    • This will be called once per template that is loaded. This is a good chance to do any custom initialization or setting parameters on the template.
  • Parameters

    • Component self - A reference to the component invoking this function.

    • Vision Template template - The template. The name of the template in the dataset will be available as template.instanceName

  • Return

    • Nothing
  • Scope

    • Client