OpenWGA 7.0 - TMLScript reference

WGA » WGA.Master
Method :

runMethod(function [, param1, param2 ...])

On object WGA.Master
Usage Runs the method of a custom TMLScript object under master session rights
Description This the pendant of WGA.Master.runFunction() for execution methods of custom TMLScript objects.

It shares the same functionality as this function by the only exception that it lacks a context parameter. Executing object methods under custom contextes is not possible as this would break the relation of the method to its object.

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

Parameters
function (JavaScript function):
The function to run under master session rights.

param1...paramN (Object, optional):
Parameters that will be given to the function as function parameters (NOT WebTML action parameters!)
Examples An example of a custom TMLScript object definition. There is a public method "outerMethod" which calls the private method "theMasterMethod" under master session rights:

this.outerMethod = function(param1) {
  return WGA.Master.runMethod(this.theMasterMethod, param1);
}
var theMasterMethod = function(p1) {
  return "Called with param " + p1;
}