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 2012/10/18 08:04:03 UTC

[jira] [Resolved] (WICKET-4822) Wicket.Event.add requires Wicket.$, but wicket-ajax-jquery is not listed as a dependency

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

Martin Grigorov resolved WICKET-4822.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.2.0
         Assignee: Martin Grigorov
    
> Wicket.Event.add requires Wicket.$, but wicket-ajax-jquery is not listed as a dependency
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-4822
>                 URL: https://issues.apache.org/jira/browse/WICKET-4822
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.1.1
>         Environment: Windows 7
>            Reporter: Adam A. Koch
>            Assignee: Martin Grigorov
>            Priority: Minor
>              Labels: javascript, jquery
>             Fix For: 6.2.0
>
>
> The javascript file wicket-event-jquery.js defines the Wicket.Event.add (starting on line 135). In this function, Wicket.$ is called (line 143). Wicket.$ is defined in wicket-ajax-jquery.js on line 1149. But WicketEventJQueryResourceReference.java doesn't list wicket-ajax-jquery.js as a dependency, jQuery (line 58/62). So, there are cases when I've wanted to bind to an event using OnEventHeaderItem but the HTML source doesn't output the needed wicket-ajax-jquery.js because it is not listed as a dependency.
> HTML output:
> <!DOCTYPE html>
> <html class="no-js" lang="en-us">
>     <head><script type="text/javascript" src="./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-1350410081272.js"></script>
> <script type="text/javascript" src="./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1350410081272.js"></script>
> <script type="text/javascript" >
> /*<![CDATA[*/
> Wicket.Event.add('#text__field__wicket__id01', "change", function(event) { 
> $(document).trigger('valuechange.adamkoch', [event.originalEvent.target.attributes["wicket:id"]]);});
> /*]]>*/
> </script>
> ...

--
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