Closed ren-zhijun-oracle closed 7 years ago
@javaserverfaces Commented Reported by stiemannkj1
@javaserverfaces Commented stiemannkj1 said: I haven't tested this yet, but the initial changes are here: https://github.com/stiemannkj1/mojarra/commit/4e523442cf15617df45f5815cbb050d890e591da
I will test tomorrow and send to vsingleton for review.
@javaserverfaces Commented stiemannkj1 said: Also, I don't have permission to change the issue, but I meant to create a bug rather than an improvement issue.
@javaserverfaces Commented stiemannkj1 said: Backport issues: JSF 2.2 #4222 does not invoke a Renderer to render jsf.js") JSF 2.1 #4223 does not invoke a Renderer to render jsf.js")
@javaserverfaces Commented stiemannkj1 said: PR sent to vsingleton: https://github.com/vsingleton/mojarra_read-only_mirror/pull/16
This PR was tested against:
vsingleton, if possible, please change this issue to a "Bug" from an "Improvement" before closing it.
@javaserverfaces Commented vsingleton said: pushed to master.
commit deb966c36e67a2c11e576e1ca8f1a525544d9899 Author: Kyle Stiemann stiemannkj1@gmail.com Date: Wed Jan 18 10:04:30 2017 -0500
https://java.net/jira/browse/JAVASERVERFACES-4217 Always render jsf.js as a component
Rendering jsf.js as a component invokes the renderkit and allows libraries to easily decorate its renderer.
modified: jsf-ri/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java
@javaserverfaces Commented This issue was imported from java.net JIRA JAVASERVERFACES-4217
@javaserverfaces Commented Marked as fixed on Tuesday, January 31st 2017, 12:48:34 pm
In any situation which causes RenderKitUtils.renderJsfJsIfNecessary() to be executed, jsf.js is rendered without invoking the ScriptRenderer through the RenderKit. This causes problems when a library needs to decorate the Renderer used to render jsf.js with a RendererWrapper. In order to be consistent with other code and allow third-party applications to decorate jsf.js's Renderer in all situations, RenderKitUtils.renderJsfJsIfNecessary() should render jsf.js by creating a simple UIOutput and calling UIOutput.encodeAll() instead of writing directly to the response.
Affected Versions
[2.3.0-m09]