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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 9h 9m 1 Martin Grigorov 27/Dec/13 09:21
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.13.0 [ 12325564 ]
        Fix Version/s 7.0.0 [ 12322958 ]
        Resolution Fixed [ 1 ]
        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.
        Martin Grigorov made changes -
        Summary allow access to ResourceReference of AbstractAutoCompleteBehavior Allow access to the JS ResourceReference of AbstractAutoCompleteBehavior
        Volker Pauli made changes -
        Field Original Value New Value
        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 a static method that returns the ResourceReference.

        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().

        Volker Pauli created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development