Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4822

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.1.1
    • 6.2.0
    • wicket
    • 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>
      ...

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            aakoch Adam A. Koch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: