Author: andrei_exadel
Date: 2008-05-13 05:07:37 -0400 (Tue, 13 May 2008)
New Revision: 8542
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
RF-3370
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-05-13
08:49:27 UTC (rev 8541)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-05-13
09:07:37 UTC (rev 8542)
@@ -7,6 +7,7 @@
package org.richfaces.renderkit;
import java.io.IOException;
+import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Iterator;
import java.util.Map;
@@ -19,6 +20,7 @@
import javax.faces.event.ActionEvent;
import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
+import javax.servlet.http.HttpServletResponse;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
@@ -104,6 +106,7 @@
CountingOutputWriter customWriter = new CountingOutputWriter();
try {
if (hasChildren(component)) {
+
ResponseWriter writer = context.getResponseWriter();
String defaultRenderKitId = context.getApplication()
@@ -121,10 +124,16 @@
context.setResponseWriter(responseWriter);
writeScriptBody(context, component, true);
result = customWriter.getContent();
+
if (writer != null) {
context.setResponseWriter(writer);
+ }else {
+ HttpServletResponse response =
(HttpServletResponse)context.getExternalContext().getResponse();
+ PrintWriter wr = response.getWriter();
+ if (wr != null) {
+ context.setResponseWriter(renderKit.createResponseWriter(wr, null,
"UTF-8"));
+ }
}
-
} else {
writeScriptBody(customWriter, (String) component
.getAttributes().get("label"));
Show replies by date