Wicket
  1. Wicket
  2. WICKET-4822

Wicket.Event.add requires Wicket.$, but wicket-ajax-jquery is not listed as a dependency

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.1.1
    • Fix Version/s: 6.2.0
    • Component/s: wicket
    • Labels:
    • Environment:
      Windows 7

      Description

      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_fieldwicket_id01', "change", function(event)

      { $(document).trigger('valuechange.adamkoch', [event.originalEvent.target.attributes["wicket:id"]]);}

      );
      /]]>/
      </script>
      ...

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Adam A. Koch
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development