[
https://issues.apache.org/jira/browse/WICKET-4911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sven Meier resolved WICKET-4911.
--------------------------------
Resolution: Fixed
Fix Version/s: 6.4.0
Assignee: Sven Meier
event is now properly triggered
> Palette Ajax update does not work
> ---------------------------------
>
> Key: WICKET-4911
> URL: https://issues.apache.org/jira/browse/WICKET-4911
> Project: Wicket
> Issue Type: Bug
> Reporter: Andreas Kappler
> Assignee: Sven Meier
> Fix For: 6.4.0
>
>
> 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()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira