Re: AjaxRequestTarget.add(component) not replacing component, but duplicating it

2012-04-05 Thread Andrew Geery
You are correct: Chosen was indeed adding additional markup that was throwing off Wicket's ability to replace the form control. The workaround was to call jquery,remove to fix/clean up the DOM before Wicket attempted to replace the tag in the renderOnDomReadyJavaScript method of the behavior.

Re: AjaxRequestTarget.add(component) not replacing component, but duplicating it

2012-03-30 Thread Martin Grigorov
Hi, Check what additional markup if generated by Chosen. It transforms select to more complex HTML structure. Then you'll have more information what should be done to replace the whole thing, not just to provide new select as what Wicket would do by default. I can also recommend you to take a

AjaxRequestTarget.add(component) not replacing component, but duplicating it

2012-03-29 Thread Andrew Geery
I have a ListMultipleChoice component (Wicket 1.5.4) with a Behavior added to it to enable the use of the Chosen ( http://harvesthq.github.com/chosen/ ) JS library. Everything works fine until I attempt to add() the component to a page in an AjaxRequestTarget. Rather than replacing the component