{column:padding=0px|width=80px}{column}{column}{column}
Property Summary
showInMenu
Flag that tells if the method appears or not in the "Methods" menu of Servoy Client.
{column:padding=0px|width=80px}{column}{column}{column}
Method Summary
Object[]
getArguments()
gets the argument array for this method if that is set for the specific action this method is taken from.
{column:padding=0px|width=100%}{column}
Property Details
The full source code of this method (including doc and function declaration).
Since
Replace with version info
Parameters
Returns
[String]
Also see
External links
Sample
var method = form.newFormMethod('function original() { application.output("Original function."); }'); application.output('original method name: ' + method.getName()); application.output('original method code: ' + method.code); method.code = 'function changed() { application.output("This is another function."); }'; method.showInMenu = false; var button = form.newButton('Click me!', 10, 10, 100, 30, method);
Flag that tells if the method appears or not in the "Methods" menu of Servoy Client.
Since
Replace with version info
Parameters
Returns
[Boolean]
Also see
External links
Sample
var method = form.newFormMethod('function original() { application.output("Original function."); }'); application.output('original method name: ' + method.getName()); application.output('original method code: ' + method.code); method.code = 'function changed() { application.output("This is another function."); }'; method.showInMenu = false; var button = form.newButton('Click me!', 10, 10, 100, 30, method);
{column:padding=0px|width=100%}{column}
Method Details
Object[]
getArguments
()
gets the argument array for this method if that is set for the specific action this method is taken from.
Will return null by default. This is only for reading, you can't alter the arguments through this array,
for that you need to create a new object through solutionModel.newMethodWithArguments(..) and assign it again.
Since
Replace with version info
Parameters
Returns
[Object][] – Array of the arguments, null if not specified.
Also see
External links
Sample
var frm = solutionModel.getForm("myForm"); var button = frm.getButton("button"); // get the arguments from the button. // NOTE: string arguments will be returned with quotes (comp.onAction.getArguments()[0] == '\'foo\' evals to true) var arguments = button.onAction.getArguments(); if (arguments && arguments.length > 1 && arguments[1] == 10) { // change the value and assign it back to the onAction. arguments[1] = 50; button.onAction = solutionModel.newMethodWithArguments(button.onAction,arguments); }
getName
()
The name of the method.
Since
Replace with version info
Parameters
Returns
[String] – A String holding the name of this method.
Also see
External links
Sample
var method = form.newFormMethod('function original() { application.output("Original function."); }'); application.output('original method name: ' + method.getName()); application.output('original method code: ' + method.code); method.code = 'function changed() { application.output("This is another function."); }'; method.showInMenu = false; var button = form.newButton('Click me!', 10, 10, 100, 30, method);
Returns the UUID of the method object
Since
Replace with version info
Parameters
Returns
[UUID]
Also see
External links
Sample
var method = form.newFormMethod('function original() { application.output("Original function."); }'); application.output(method.getUUID().toString());