jquery-ui.css and CSSURLRewriter

Robert Hannebauer <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <[email protected]>
Hello,

i'm playing with webjars (https://github.com/eddyson-de/tapestry-webjars) and jquery-ui. Everything work fine, except when i try to use the jquery-ui.css.

It took me some time to understand the following error message, while trying to load the css file:

Caused by: java.lang.RuntimeException: Unable to locate asset 'webjars:META-INF/resources/webjars/jquery-ui/1.12.1/%22images%2Fui-icons_555555_256x240.png%22'
(the file does not exist).
    at org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:390)
    at org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:305)
    at org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:131)
    at $AssetSource_25dc8e7415b4a.getAsset(Unknown Source)
    at org.apache.tapestry5.internal.services.assets.CSSURLRewriter.replaceURLs(CSSURLRewriter.java:177)
    at org.apache.tapestry5.internal.services.assets.CSSURLRewriter.access$100(CSSURLRewriter.java:46)
    at org.apache.tapestry5.internal.services.assets.CSSURLRewriter$1.perform(CSSURLRewriter.java:109)
    at org.apache.tapestry5.internal.services.assets.CSSURLRewriter$1.perform(CSSURLRewriter.java:104)
    at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)

The file %22images%2Fui-icons_555555_256x240.png%22  does really not exists.

Playing with SymbolConstants.STRICT_CSS_URL_REWRITING does not really help, because the CSSURLRewriter fails too early.

The root cause is the *comment* header of  jquery-ui.css. Within this header exists the string "url(%22images%2Fui-icons_555555_256x240.png%22)".
I assume, it would be a good idea to either ignore comments or to be more tolerant or catch the exception and then evaluate STRICT_CSS_URL_REWRITING.
What do you think?

Regards,
Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.