Heyvaert / wiquery

Automatically exported from code.google.com/p/wiquery
0 stars 0 forks source link

Several buttonBehavior #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I have several ButtonBehavior (200x) on my webPage and I update via Ajax and I 
remark that the look&feel is not display immediatly. In fact is due to that 
there are for each buttonBehavior  a :
<evaluate><![CDATA[$('#buttonxxx').button({});]]></evaluate> on ajax reponse 
and it's very slow to start a javascript evaluation.

And I would to known if it's possible to regroup all wiquery behavior 
javascript to only one <evaluate></evaluate> ?

you can see the video to understand the problem : 
http://www.youtube.com/watch?v=vtRq_YfRHY8

Duto

Original issue reported on code.google.com by dutrieux...@gmail.com on 5 Apr 2012 at 9:41

GoogleCodeExporter commented 9 years ago
That is a problem, yes. I think I have a fix for you. This will groups as much 
evaluates together as possible. You can test this using the sources (branch 
wicket-1.5 from github) or the 1.5 SNAPSHOT from our maven repo.

Please note that this does not group all evaluations. 

Say you have component1 ... component12 and they are all WiQuery components add 
them all to the AjaxRequestTarget:
You will have 12 evaluates. In each of these evaluates can be more one or more 
statements. This because WiQuery scans for WiQuery enabled Behavior and WiQuery 
enabled child components.

To fix this: wrap them in a container (eg WebMarkupContainer) and add the 
container to the AjaxRequestTarget.

Original comment by hielke.hoeve on 8 May 2012 at 5:36

GoogleCodeExporter commented 9 years ago
Oki I test it on v1.5-SNAPSHOT : that's work well, but it's possible to have 
this fix on v1.4 of wiquery too ?

Best regards 

Duto

Original comment by dutrieux...@gmail.com on 8 May 2012 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by hielke.hoeve on 22 May 2012 at 7:43