[
https://issues.apache.org/jira/browse/WICKET-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239516#comment-13239516
]
Ronald Tetsuo Miura commented on WICKET-4471:
---------------------------------------------
The thing is, the only point in the code that
ExternalUrlResourceReference.getUrl() (which returns the external URL) is
called is in BasicResourceReferenceMapper.mapHandler().
The problem is, when the execution reaches that block, the ResourceReference
considered is a ResourceBundleReference, not a ExternalUrlResourceReference, so
the instanceof returns false, and getUrl() is not called. Then, the code
proceeds to create the Url from the reference's Resource, making it relative to
'wicket/resource/org.apache.wicket.Application/' instead of the absolute
external URL.
Should I create a new issue for this bug, since the problem is not the registry
anymore, but a problem in the URL generation?
> Generic registry of javascript/css resource references
> ------------------------------------------------------
>
> Key: WICKET-4471
> URL: https://issues.apache.org/jira/browse/WICKET-4471
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 6.0.0-beta1
> Reporter: Ronald Tetsuo Miura
> Assignee: Emond Papegaaij
> Priority: Minor
> Attachments:
> 0001-WICKET-4471-unwrap-ResourceBundleReference-to-render.patch
>
>
> It would be nice if JavaScriptLibrarySettings had a generic mechanism to
> register javascript/css resource references (maybe using something like
> MetaDataKeys).
> This way, extension/third-party components (ModalWindow, DateTimeField, etc.)
> could register their resources, or just lookup for substitute resource
> references for their own scripts/stylesheets.
> This would allow some optimizations, such as minification/compression and
> joining many files into one, and hosting static files in CDNs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira