[ 
https://jira.jboss.org/browse/RF-7399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nick Belaevski resolved RF-7399.
--------------------------------

    Fix Version/s:     (was: 4.0.0.M1)
       Resolution: Out of Date


1) a4j:loadStyle is excluded from 4.x, because JSF 2 has h:outputStylesheet
2) Loading of *.ecss file from outside classpath is supported since A2

> loadstyle does not support xcss files outside the classpath
> -----------------------------------------------------------
>
>                 Key: RF-7399
>                 URL: https://jira.jboss.org/browse/RF-7399
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 3.2.2
>         Environment: winxp, jboss5, seam2.1.1
>            Reporter: Jacques Lemire
>            Assignee: Nick Belaevski
>
> (See the bug I reported on the JBoss Tools jira 
> (https://jira.jboss.org/jira/browse/JBIDE-4500), as the projects they 
> generate load an xcss from a location that is not on the classpath)
> I have reported a bug to the JBoss Tools team, as their seam application 
> generator creates a template that tries to load an XCSS from a file location 
> outside the classloader, which does not work. There is a workaround which I 
> guess they will include in their next version, but I have been told to report 
> it here too as a bug. I fully understand that you may consider this bug 
> report a non-issue, but as the documentation for xcss templates is scarce, I 
> do not know what the intended behavior really is.
> What I see is that the TemplateCSSRenderer does support to add the base64 
> suffix to the resource name through "getData", and that is what is being used 
> when it is loaded from the classpath. However, when it is loaded as a 
> StaticResource by the ResourceBuilderImpl, the StaticResource.getUri 
> overrides the InternetResourceBase.getUri. For some reaon, 
> StaticResource.getUri does not call InternetResourceBuilder.getUri, passing 
> getDataToStore(context, data)), so TemplateCSSRenderer.getData never gets 
> called.
> <a:loadStyle src="resource:///stylesheet/theme.xcss"/> is rendered as:
> <link class='user' rel='stylesheet' type='text/css' 
> href='/scn/stylesheet/theme.xcss' />
> If StaticResource did not override the InternetResourceBase.getUri method, it 
> would return a properly suffixed uri which would in turn be sent to the 
> StyleRenderer (see LocalResourceRenderer.encodeToHead), which would render 
> the link tag properly. In turn, that link tag would be recognized by the view 
> handler as an a4j resource and the transformed css would be returned to the 
> browser.
> <a:loadStyle src="resource:///stylesheet/theme.xcss"/> should be rendered as:
> <link class='user' rel='stylesheet' type='text/css' 
> href='/scn/a4j/s/3_2_2.SR1stylesheet/theme.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__'
>  />
> Maybe my diagnostic is wrong, as I do not have time to set my system up to 
> compile and test it, and maybe there are good reasons why static resource do 
> not use the resource's renderer to transform the URL, but you are in a much 
> better position than me to answer these question. Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to