StreamingAddResource with t:documentHead causes link to non-existent header.css
to be output.
---------------------------------------------------------------------------------------------
Key: TOMAHAWK-1311
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1311
Project: MyFaces Tomahawk
Issue Type: Bug
Affects Versions: 1.1.7-SNAPSHOT
Reporter: Simon Kitching
Priority: Minor
Method StreamingAddResource.addStyleLoaderHere(..) looks really weird.
It has no javadoc, so it's not clear what the intention of this was, but it
generates a url like:
<link rel="stylesheet"
href="/pms/faces/myFacesExtensionResource/org.apache.myfaces.component.html.util.StreamingResourceLoader/12180989/52/header.css"
type="text/css">
to be output when called, where the "52" is a value that changes per request.
And when t:documentHead is used, method DocumentHeadRenderer.writeBeforeEnd
ensures that it *is* called.
There is no file called "header.css" anywhere in the tomahawk library. And the
url generated includes the "current request number" which is different for each
request, so the browser cannot possibly cache the result.
Is this perhaps meant to allow a tomahawk component to "insert" css into a page
head by always rendering a link which causes a second request that then serves
up the component's css which has been cached in memory? If so, then at the
least this all needs to be documented. And if possible disabled when no
component has registered css.
Right now, my app which uses StreamingAddResource and t:documentHead is making
a second pointless request for this css on every page.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.