Multiple windows limiit in servoy

Questions, tips and tricks and techniques for scripting in Servoy

Multiple windows limiit in servoy

Postby eKelman » Mon Jun 27, 2011 6:47 pm

HI All,

Scenario:
Users click a button and it opens a window. The user can click this button on different rows, opening the same "form" just named differently. The form will display some sort of summary based on the row. The user needs to be able to compare the different summaries for different rows.

Problem:
After the user opens the form 10-15 times the system appears to hang and the user is not able to do anything until they refresh the browser.
(The user can close the forms and we still have the same issue)

Code:
Solution Model example - causes issue
Code: Select all
   var _js_baseForm = solutionModel.getForm('frm_test')
   var _js_targetForm = solutionModel.newForm(lv_newform, _js_baseForm.serverName, _js_baseForm.tableName, _js_baseForm.styleName, false, _js_baseForm.getBodyPart().height, _js_baseForm.width)
   _js_targetForm.extendsForm = _js_baseForm
   _js_targetForm.useSeparateFoundSet = true // Optional
   forms[lv_newform].showMe(lv_newform, 'abc')


Create New Form Instance example - causes issue
Code: Select all
  application.createNewFormInstance(designFormName,newInstanceScriptName)


Open form in dialog - no issue with hanging the system, but cannot open multiples of the same form
Code: Select all
  application.showFormInDialog(form,[x],[y],[width],[height],[dialogTitle],[resizable],[showTextToolbar],[windowName],[modal])


Has anyone else experienced this? I vaguely remember servoy having some limitation on the number of windows being opened or used or something but can't find anything online about that or a solution to this. There was a posting in the forum http://forum.servoy.com/viewtopic.php?f=3&t=13567 about the differences of the code above being added to a blueprint of some sort?

Is there an issue with clean up or something when utilizing the above methods?

Any input would be greatly appreciated.

Thanks
Ernest
Kelman Technologies
eKelman
 
Posts: 52
Joined: Tue May 12, 2009 9:09 pm

Re: Multiple windows limiit in servoy

Postby jcompagner » Tue Jun 28, 2011 11:10 am

if i read this correctly it is purely because you use newFormInstance ?

With hang you mean no clicks are doing anything anymore? No logs on the server? Do you get the "loading" in the browser?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Multiple windows limiit in servoy

Postby eKelman » Tue Jun 28, 2011 7:16 pm

Hi Johan,

the application appears to hang, as in no clicking, nothing in the log, or anything will work until a refresh of the browser is performed. The refresh causes issues where the opening, a new instance, of a previously opened form will result in a page null error on the first attempt to open after the refresh. The second attempt to open the new instance of a form that was opened prior to the refresh will bring back the form correctly.

This happens when utilizing either createNewFormInstance or when using the solution model code as listed in the original post.

I have read in one post on the forums saying something about the form not being added to the "blueprint" when utilizing createNewFormInstance. The forum posting also mentioned that the solution model would add this newly created form to the "blueprint". While trouble shooting this issue I noticed the "onHide" event would not fire. I am not sure if that has something to do with this particular issue, eg clean up of forms when closed and resetting some sort of counter?
Ernest
Kelman Technologies
eKelman
 
Posts: 52
Joined: Tue May 12, 2009 9:09 pm

Re: Multiple windows limiit in servoy

Postby jcompagner » Wed Jun 29, 2011 10:47 am

createNewFormInstance will not touch the solution model now that just creates new ui instance of the form "class" that comes from the solution model
If you do newForm through the solution model you create a new "class" where by default you have 1 ui instance of by its name.

if onhide is not fired it could be that the system things that the modal dialog is not closed yet, so yes it keeps thinking the modal dialog is open and you can only have 15 open at once. So after 16 you should see problems.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Multiple windows limiit in servoy

Postby lvostinar » Wed Jul 06, 2011 2:12 pm

Just for the record, the issue will be fixed in Servoy 6.0 (the release after rc3). This issue is about the limitation of not being possible to have more than 15 pages(windows/dialogs) open at the same time(web client). The limitation still exists, however we improved the mechanism to detect which pages are open and which are not.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Multiple windows limiit in servoy

Postby eKelman » Thu Jul 07, 2011 11:08 pm

Laurian / Johan,

Can we get an interim build with this fix in place? Or a work around as there is no scheduled date for upgrading to servoy 6.
Ernest
Kelman Technologies
eKelman
 
Posts: 52
Joined: Tue May 12, 2009 9:09 pm


Return to Methods

Who is online

Users browsing this forum: No registered users and 7 guests