You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2015/06/30 14:04:05 UTC

[jira] [Updated] (WICKET-5939) AjaxEventBehavior should preserve the event name as provided

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

Martin Grigorov updated WICKET-5939:
------------------------------------
    Summary: AjaxEventBehavior should preserve the event name as provided  (was: AjaxEventBehavior event name case-sensitive)

> AjaxEventBehavior should preserve the event name as provided
> ------------------------------------------------------------
>
>                 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
>
> 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)