[
https://issues.apache.org/jira/browse/WICKET-5429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov updated WICKET-5429:
------------------------------------
Attachment: WICKET-5429-RRBR.patch
Attaching an extended version of Cedric's patch.
There were few problems with his version:
1) it was fixing only the case with CSS resources, but not for JS ones
2) his code was used for normal resource bundles too. I.e. the bundle will be
recreated with the details of each of its resources and it will use the ones
from the last resource reference.
I've added a special ReplacementResourceBundleReference to be able to decide
when to preserve the details and when not.
> property media of link css
> ---------------------------
>
> Key: WICKET-5429
> URL: https://issues.apache.org/jira/browse/WICKET-5429
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.12.0
> Reporter: Duto
> Assignee: Martin Grigorov
> Priority: Trivial
> Attachments: Sample.zip, WICKET-5429-RRBR.patch, fix-WICKET-5429.patch
>
>
> Media property of link (css) is not set if addResourceReplacement is set on
> WebApplication.init :
> I set a css file on page via renderHead(IHeaderResponse response) with screen
> media :
> @Override
> public void renderHead(IHeaderResponse response) {
> response.render(CssHeaderItem.forReference(OriginalResourceReference.get(),
> "screen"));
> }
> and after if I defined a resourceReplacement on application init :
> @Override
> public void init() {
> super.init();
> addResourceReplacement(OriginalResourceReference.get(), new
> CssResourceReference(OriginalResourceReference.class, "overwrite.css"));
> }
> I don't have the property media="screen" when wicket generated page.
> Duto
--
This message was sent by Atlassian JIRA
(v6.1#6144)