Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Javadoc of org.apache.wicket.extensions.markup.html.form.palette.Palette describes a method of receiving ajax updates when the selection has changed:
Palette palette=new Palette(...) {
protected Recorder newRecorderComponent()
{
Recorder recorder=super.newRecorderComponent();
recorder.add(new AjaxFormComponentUpdatingBehavior("onchange")
);
return recorder;
}
}
Prior to wicket 6 this worked, but the jQuery integration broke this functionality. The problem lies in palette.js line 127:
if (recorder.onchange!=null)
{ recorder.onchange(); }Here the change event should be fired when the content of the hidden input field that is used to record the selection changes. However since the ajax update on the onchange event is registered by AjaxFormComponentUpdatingBehavior with jQuery, recorder.onchange will always be null.
The solution might be something like this:
$(recorder).change()