JSMethod.execute( array of arguments)
I would like to use it for the following reason:
I want to make changes to my form using the solutionmodel
I noticed when I add this coding in the onLoad trigger of the form, that this is too late; the changes made by the solution model are not accepted.
So I need to make these changes before load (on load of the solution)
But I also want to use a form method to make these changes.
So if there is a onPreLoad method on my form, I want to execute this:
- Code: Select all
var _form_array = forms.allnames;
var _form
var _js_form
var _preload_method
for (var i = 0; i < _form_array.length; i++)
{
_form = _form_array[i]
_js_form = solutionModel.getForm(_form)
_preload_method = _js_form.getFormMethod('onPreLoad')
if (_preload_method)
{
forms[_form].onPreLoad();
}
}
The problem is, that the form itself is also loaded. So if the
forms[_form].onPreLoad();
could be replaced by
_preload_method.execute();
and the form is not loaded when executing this method, then it would wonderful.
I know I could make these onPreLoad methods globals, but I want it to keep with my forms.
Can this be realised?
Martin