Bug in DefaultAddResource. Resources added AddResource.BODY_END are rendered in
the page header
-----------------------------------------------------------------------------------------------
Key: TOMAHAWK-902
URL: https://issues.apache.org/jira/browse/TOMAHAWK-902
Project: MyFaces Tomahawk
Issue Type: Bug
Components: ExtensionsFilter
Affects Versions: 1.1.3
Reporter: David Turner
Fix For: 1.1.3
Resources added with a position of AddResource.BODY_END are rendered in the
page header not at body end.
In DefaultAddResource.writeWithFullHeader:724:
if (afterBodyContentInsertPosition >= 0)
{
...
originalResponse.insert(headerInsertPosition,
writerWrapper.toString());
}
Shouldn't this be:
if (afterBodyContentInsertPosition >= 0)
{
...
originalResponse.insert(afterBodyContentInsertPosition,
writerWrapper.toString());
}
Workaround:
Write your own AddResource implementation (just copy the
DefaultAddResource); include this fix; override default in web.xml with:
<context-param>
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
<param-value>au.com.project.common.ui.renderkit.html.util.DefaultAddResource</param-value>
<description>Override default resource handler (extensions
filter)</description>
</context-param>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.