Form loading with Headless Client

The forum to discuss the Headless version of Servoy. Web, Java and Servlet development questions can all be posted here.

Form loading with Headless Client

Postby g.vanwieringen » Wed Jan 30, 2013 6:27 pm

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")
g.vanwieringen
 
Posts: 2
Joined: Mon Jan 21, 2013 12:32 pm

Re: Form loading with Headless Client

Postby mboegem » Thu Jan 31, 2013 9:59 am

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
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

Re: Form loading with Headless Client

Postby g.vanwieringen » Thu Jan 31, 2013 11:36 am

Thank you for your answer!
g.vanwieringen
 
Posts: 2
Joined: Mon Jan 21, 2013 12:32 pm


Return to Servoy Headless Client

Who is online

Users browsing this forum: No registered users and 3 guests