Page 1 of 1

Form loading with Headless Client

PostPosted: Wed Jan 30, 2013 6:27 pm
by g.vanwieringen
1. When deploying a solution on a application server, all referenced solutions are merged into the main solution. Am I correct in assuming that when you create a headless client with this solution, all associated forms are loaded (and form onload methods executed)?
2. If so, what are ways to prevent this from happening?
3. You can specify login information when creating a headless client. I was told that useruid/password is only required if you load a solution in the headless client flagged as 'must authenticate'. Are forms loaded after login or before?
4. In the IHeadlessClient interface, a method "createHeadlessClient(String solutionname, String username, String password, Object[] solutionOpenMethodArgs) " is defined. What are the solutionOpenMethodArgs that I can use? (I only know of "nodebug")

Re: Form loading with Headless Client

PostPosted: Thu Jan 31, 2013 9:59 am
by mboegem
1. when deploying a solution including modules, you must export them from developer first by setting the 'export referenced modules' in the export dialog.
You will have one .servoy file including the main solution and modules, which can be imported.
After importing you will see every solution / module being shown in the 'solutions' page of your servoy-admin pages.
Concerning the loading of forms: this will only happen when you touch a form in any way (calling forms.myForm is enough to do that.)
2. A headless client will go through the onSolutionOpen method, an will do exactly what is specified in there.
To prevent executing code, you can check on application type:
Code: Select all
application.getApplicationType() == APPLICATION_TYPES.HEADLESS_CLIENT

3. If a solution requires authentication, nothing will happen until the authorisation was positively validated.
4. the 'solutionOpenMethodArgs' is just a way to pass any argument you make up yourself. The arguments are being passed to the 'onSolutionOpen' method where you can use them to have your headless client solution trigger certain actions or to pass specific data. Servoy itself is not passing anything there, so there's no 'default list' of arguments which are allowed to use.

Hope this helps

Re: Form loading with Headless Client

PostPosted: Thu Jan 31, 2013 11:36 am
by g.vanwieringen
Thank you for your answer!