You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Fabio Fioretti (JIRA)" <ji...@apache.org> on 2014/05/06 14:38:14 UTC
[jira] [Created] (WICKET-5581) CachingResourceStreamLocator is not extension-aware
Fabio Fioretti created WICKET-5581:
--------------------------------------
Summary: CachingResourceStreamLocator is not extension-aware
Key: WICKET-5581
URL: https://issues.apache.org/jira/browse/WICKET-5581
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.15.0
Reporter: Fabio Fioretti
Consider, as a real case scenario, an application that integrates with Apache FOP in a way that, by overriding Page's getMarkupType(), makes it possible to have a component render its .fo markup (to generate a PDF) instead of the usual html, depending on whether it is added to a Page with the fo MarkupType or the standard html one.
This means the typical Panel of such application has two markup files, an html one and a fo one: Panel.html and Panel.fo.
The default CachingResourceStreamLocator makes use of ResourceReference#Key for the cache. That Key completely ignores the extension of the file or, better, assumes it is part of the name, while for markup files this is apparently not the case. Basically, Panel.html and Panel.fo have the same Key, the name of which is simply "Panel".
Therefore, when a Panel is first rendered in html, its html markup reference is cached and there is no way to make it render again in fo, because the cache will always return the html markup reference.
--
This message was sent by Atlassian JIRA
(v6.2#6252)