Multiple windows limiit in servoy

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

	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

  application.createNewFormInstance(designFormName,newInstanceScriptName)

Open form in dialog - no issue with hanging the system, but cannot open multiples of the same form

  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

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?

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?

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.

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 / 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.