Re: Centralizing ajax inline javascript

2012-10-08 Thread lukuperman
Sebastien, Ernesto, I had to repost because after centralizing the ajax behavior I saw the browser does not send CheckBox ajax requests in parallel any more. Is this because we centralized the behavior? Lucas Kuperman -- View this message in context:

Re: Centralizing ajax inline javascript

2012-09-30 Thread lukuperman
Hi Sebastien, I applied your last approach and I think it would work. It is working but step 4 Get the component back is not finding the checkbox because of (what I believe) an incomplete path. It doesn't sound complicated, I'll investigate. However I am starting to understand things more due to

Re: Centralizing ajax inline javascript

2012-09-30 Thread lukuperman
Hi Ernesto. We seem to be in the same page now. Sebastien's approach is also about a single behavior, with the small difference of adding the CheckBoxes onclick event in the server side (I did it in the onComponentTag method instead of relying on attributemodifiers because of performance) rather

Re: Centralizing ajax inline javascript

2012-09-30 Thread vineet semwal
hi ! dynamic load will only be useful if you can add new items without repainting the repeater's parent (repainting parent will cause the repeater to render again), read Igor Vaynberg's article for the idea http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/

Re: Centralizing ajax inline javascript

2012-09-30 Thread lukuperman
Hi Sebastien, just to understand, if I don't need an AjaxCheckBox anymore then I shouldn't extend from it right? I'm in troubles, cause if I dont extend, I have no behavior to call back, and if I do extend then the original problem arise about the inline onclick script being attached to each

Re: Centralizing ajax inline javascript

2012-09-29 Thread lukuperman
Thanks Ernesto and Sebastien! I'm going to apply your suggestions during the weekend and keep you posted. In the meantime, Ernesto, I want to clarify that I don't want to pass any additional parameter to the server. I just want the proper onUpdate() method of the proper AjaxCheckBox instance be

Re: Centralizing ajax inline javascript

2012-09-28 Thread vineet semwal
assuming you are using a repeater say dataview/gridview,think about that in this way 200*200==40k items of repeater,are you rendering that number of items at once? i would have used a small table with navigator or some ajax scroll behavior .. On Fri, Sep 28, 2012 at 6:11 PM, lukuperman

Re: Centralizing ajax inline javascript

2012-09-28 Thread Sebastien
Yes, I think the AbstractDefaultAjaxBehavior could look to something like: public void renderHead(Component component, IHeaderResponse response) { super.renderHead(component, response); response.renderJavaScript(function boup(id) { + this.getCallbackScript() + }, my-script-id);

Re: Centralizing ajax inline javascript

2012-09-28 Thread lukuperman
Hi Vineet. I knew someone would ask. Lots of components right? Yes, I agree. The component tree is giving us a hard time with performance in general (around 5 minutes to process) and stack overflows when serializing, etc. But focusing back to my original question, unfortunately the business

Re: Centralizing ajax inline javascript

2012-09-28 Thread vineet semwal
actually i have the elegant solution for your problem in 6.x ,i didn't recommend it before because you are on 1.4 i wrote Quickview and QuickGridView ,the whole project is available at https://github.com/vineetsemwal/quickview including examples. the way of using QuickView is almost like