Description
I'm using the Bootstrap DatePicker js library (also included in wicket-boostrap)
doc: http://bootstrap-datepicker.readthedocs.org/
I extended AjaxEventBehavior to implement Bootstrap-DataPicker's 'changeDate' event.
my first attempted failed. My AjaxEventBehavior was never triggered. after further investigation I discovered that the event name was all in lowercase! (which prevented latest chrome to trigger it)
Wicket.Ajax.ajax({"u":"./?2-2.IBehaviorListener.0-calendarLink","c":"calendarLink6","dep":[function(attrs){return [
{'name':'newDate', 'value': attrs.event.format()}]}],"e":"changedate"});;
the getEvent method in AjaxEventBehavior is lowercase the event name!
public String getEvent()
{
String events = event.toLowerCase();
for my case, I just overridden the getEvent to make it work.
I couldn't find a clear description/specification related to case-sensitive or case-insensitive!
one possible hint https://en.wikipedia.org/wiki/DOM_events under Event object:
DOMString (type): The name of the event (case-insensitive in DOM level 2 but case-sensitive in DOM level 3).
should
String events = event.toLowerCase()
be removed?
and Martin Grigorov added the following comment
http://www.w3.org/TR/DOM-Level-3-Events/ confirms what you say.
Attachments
Issue Links
- breaks
-
WICKET-6047 AjaxFormComponentUpdatingBehavior onUpdate not called
- Resolved