You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Daniel Stoch (JIRA)" <ji...@apache.org> on 2009/10/05 17:44:31 UTC
[jira] Updated: (WICKET-2507) Inconsistent resource path using
and HeaderContributor after second request
[ https://issues.apache.org/jira/browse/WICKET-2507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Stoch updated WICKET-2507:
---------------------------------
Attachment: wicket_link_testproject.zip
> Inconsistent resource path using <wicket:link> and HeaderContributor after second request
> -----------------------------------------------------------------------------------------
>
> Key: WICKET-2507
> URL: https://issues.apache.org/jira/browse/WICKET-2507
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.1, 1.4.2
> Reporter: Daniel Stoch
> Attachments: wicket_link_testproject.zip
>
>
> In Wicket 1.4.1, 1.4.2 there is an inconsistency in rendering resource path (eg. for css) when we are using <wicket:link> tag in HTML and HeaderContributor in Java code.
> When we enter a page with a linked resource (using: <wicket:link>):
> ...
> <head>
> <title>Wicket Quickstart Archetype Homepage</title>
> <wicket:link>
> <link href="main.css" rel="stylesheet" type="text/css" media="screen, projection"/>
> </wicket:link>
> </head>
> ...
> for the very first time (after starting application), a link for main.css is rendered as:
> <link href="resources/com.mycompany.HomePage/main.css" rel="stylesheet" type="text/css" media="screen, projection"/>
> But after the second request this link is always rendered as:
> <link href="resources/com.mycompany.HomePage/main_locale.css" rel="stylesheet" type="text/css" media="screen, projection"/>
> where "_locale" is your current locale string (eg. "_pl", "_de", ...)
> So the locale string is appended to the resource path. In Wicket 1.3.6 the path is always without locale.
> You can try attached quickstart-app to see the difference.
> When we replace <wicket:link> in html, with CSSPackageResource.getHeaderContribution in code:
> add(CSSPackageResource.getHeaderContribution(HomePage.class, "main.css"));
> this link is always rendered as:
> <link rel="stylesheet" type="text/css" href="resources/com.mycompany.HomePage/main.css" />
> Well I think both ways: using <wicket:link> or header contribution in code, should produce always the same url path for resource and it should not contain "_locale" suffix (as in Wicket 1.3.6).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.