OpenWGA 7.10 - TMLScript reference

WGA
Property :

createObject(modulename [, param1, ...paramN])
createObject(objectDef [, param1, ...paramN])

On object WGA
Usage Creates a custom TMLScript object
Description

This is a shortcut method for Design.createObject() which uses the current design context of the script.

There are two variants of this method:

Variant 1 creates a custom TMLScript object directly from a TMLScript module that contains the object code.

Variant 2 creates a custom TMLScript object from an precompiled definition object which has been created via Design.loadObjectDefinition(). Use this variant to create multiple objects based on the same definition to increase performance.

For backward compatibility there still is a global function "createObject()" available whose use is discouraged since OpenWGA 5.3.

Parameters modulename (String):
Variant 1: Name of the TMLScript module containing the object code.

objectDef (Function):
Variant 2: Precompiled definition object, created by WGA.loadObjectDefinition()

param1...param5 (Optional):
Parameters for the TMLScript object constructor
Return value Newly created custom TMLScript object
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
    portletevent