You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martijn Dashorst (JIRA)" <ji...@apache.org> on 2015/07/05 22:17:05 UTC

[jira] [Updated] (WICKET-5939) AjaxEventBehavior should not lower-case the event name

     [ https://issues.apache.org/jira/browse/WICKET-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst updated WICKET-5939:
-------------------------------------
    Fix Version/s:     (was: 7.0.0-M7)
                   7.0.0

> AjaxEventBehavior should not lower-case the event name
> ------------------------------------------------------
>
>                 Key: WICKET-5939
>                 URL: https://issues.apache.org/jira/browse/WICKET-5939
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 7.0.0-M5, 7.0.0-M6
>            Reporter: Gabriel Bucher
>            Assignee: Martin Grigorov
>             Fix For: 7.0.0, 6.21.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)