[ 
https://issues.apache.org/jira/browse/WICKET-3897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064804#comment-13064804
 ] 

Martin Grigorov commented on WICKET-3897:
-----------------------------------------

This works by design.
With mountPage("/", SomePage.class) will add user-mapper which means it has 
priority over the system ones with the same compatibility score.
Both 
org.apache.wicket.request.mapper.BasicResourceReferenceMapper.getCompatibilityScore(Request)
 and 
org.apache.wicket.request.mapper.MountedMapper.getCompatibilityScore(Request) 
return 0 and the later wins because it is added by the user. Thus the request 
to 
http://localhost:8080/wicket/resource/com.kenstevens.wicketbug3897.wicket.HomePage/style-ver-1310585017000.css
 is handled by the user-added mapper.

Maybe we should make 
BasicResourceReferenceMapper.getCompatibilityScore(Request) return a higher 
value if the first two segments match the EncoderContext's namespace and 
resourceIdentifier ?!

> renderCSSReference doesn't work with mountPage("/")
> ---------------------------------------------------
>
>                 Key: WICKET-3897
>                 URL: https://issues.apache.org/jira/browse/WICKET-3897
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC5.1
>         Environment: Windows.  Java 6.  Jetty.
>            Reporter: Ken Stevens
>            Assignee: Martin Grigorov
>              Labels: css, mountPage
>         Attachments: wicketbug3897.zip
>
>
> response.renderCSSReference(new PackageResourceReference(BasePage.class, 
> "BasePage.css"));
> will correctly render the css reference if the page is not mounted or if it 
> is mounted to a location other than "/".  However if I mount the page to "/" 
> using WebApplication.mountPage() then the css reference doesn't work.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to