I have a method that in Servoy Developer version 2.5 works correctly and with version 3.0 build 371 it gives the following error:
org.mozilla.javascript.JavaScriptException: Cycle detected, function buscar_articulo called 22 times
//Start a find request
controller.find();
nombre = '%'+globals.gText+'%';
controller.search();
globals.gText = ''
//si no hemos encontrado ningun registro
if ( controller.getMaxRecordIndex()==0 )
{
controller.loadAllRecords()
}
Java version 1.5.0_08-b3 (Windows XP)
Carles Barbal
cbarbal:
I have a method that in Servoy Developer version 2.5 works correctly and with version 3.0 build 371 it gives the following error:
org.mozilla.javascript.JavaScriptException: Cycle detected, function buscar_articulo called 22 times
//Start a find request
controller.find();
nombre = ‘%’+globals.gText+‘%’;
controller.search();
globals.gText = ‘’
//si no hemos encontrado ningun registro
if ( controller.getMaxRecordIndex()==0 )
{
controller.loadAllRecords()
}
Java version 1.5.0_08-b3 (Windows XP)
Carles Barbal
Try to use:
//Start a find request
controller.find();
nombre = '%'+globals.gText+'%';
var found = controller.search();
globals.gText = null
//si no hemos encontrado ningun registro
if ( found == 0 )
{
controller.loadAllRecords()
}
Thanks Nicola but does not work.
The method is related to the event onDataChange. In mode debugger I have seen that it executes the method twice, it does not pay attention to the value that it has var found or in controller.getMaxRecordIndex()==0
The first time gives the following error:
org.mozilla.javascript.JavaScriptException: Cycle detected, function buscar_articulo called 22 times
the second time:
org.mozilla.javascript.JavaScriptException: Cycle detected, function buscar_articulo called 23 times
Carles Barbal
Hi Carles,
Try to execute your method with a button and not related to the onDataChange and see if it works. You probably have some other event related to the form. Maybe is a good idea to build a single form test solution and see if you can reproduce your problem.
ciao
Hi Enrico,
With the button it works correctly. But I believe that he is bug, works correctly in record view, list view, but not with table view. I have it in tabpanel that shows one table view.
Felicidades al evangelista.
Carles Barbal
I think the best thing you can do is to try to isolate it in a microsolution and if reproduceable then post to support at:
http://crm.servoy.com/servoy-webclient/ … oy_support
cbarbal:
Felicidades al evangelista.
MUCHAS GRACIAS… muy emocionado y orgulloso!.