Wicket
  1. Wicket
  2. WICKET-5455

Allow access to the JS ResourceReference of AbstractAutoCompleteBehavior

    Details

      Description

      Actually there's no way to beautify the URL for the "wicket-autocomplete.js", because its ResourceReference is defined as private static final in AbstractAutoCompleteBehavior. I would suggest to add a static method that returns the ResourceReference. This way, one can easily mount the resource in WebApplication#init().

        Activity

        Hide
        Martin Grigorov added a comment -

        I've made the static field public so you can reference it.

        But it will work even now by using:
        mountResource("path", new JavaScriptResourceReference(
        AutoCompleteBehavior.class, "wicket-autocomplete.js"));

        Wicket uses ResourceReference.Key#equals to see whether it is the same so it will just work.

        Show
        Martin Grigorov added a comment - I've made the static field public so you can reference it. But it will work even now by using: mountResource("path", new JavaScriptResourceReference( AutoCompleteBehavior.class, "wicket-autocomplete.js")); Wicket uses ResourceReference.Key#equals to see whether it is the same so it will just work.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Volker Pauli
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development