On Wed, Feb 8, 2012 at 4:33 PM, Bertrand Guay-Paquet <ber...@step.polymtl.ca> wrote: > Hi, > > Merging multiple evaluates together will change the scope of some variables. > The variables in the scope of an evaluate block would carry on in the > following evaluate blocks. This could however be mitigated by wrapping each > evaluate block in its own function.
True. Wrapping them in {} should be enough to prevent this problem. > > Bertrand > > > On 08/02/2012 8:24 AM, Martin Grigorov wrote: >> >> Hi, >> >> Do you imagine a use case in which several<evaluate>s in >> <ajax-response> should be executed separately (one after another) as >> it is now ? >> Each<evaluate> (and<priority-evaluate>) is executed in an eval() in >> wicket-ajax.js. As we all know eval() is slow. As an optimization I >> think we can merge all<evaluate>s in one (at server side) and eval >> them all together. The only drawback I see is that error reporting >> will be worse because the exception message will say "there is an >> error in 'all JS in one<evaluate> here' " >> > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com