Author: andrei_exadel
Date: 2008-12-05 06:50:42 -0500 (Fri, 05 Dec 2008)
New Revision: 11573
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
Fix nonsense catch handler
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-12-05
06:24:39 UTC (rev 11572)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-12-05
11:50:42 UTC (rev 11573)
@@ -54,6 +54,8 @@
import org.ajax4jsf.renderkit.ComponentsVariableResolver;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.CountingOutputWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.richfaces.component.UIProgressBar;
/**
@@ -63,6 +65,8 @@
*
*/
public class AbstractProgressBarRenderer extends TemplateEncoderRendererBase {
+
+ private static final Log log = LogFactory.getLog(AbstractProgressBarRenderer.class);
/** Ajax function performing polling */
private static final String AJAX_POLL_FUNCTION = "A4J.AJAX.Poll";
@@ -123,7 +127,7 @@
* @return
*/
public StringBuffer getMarkup(FacesContext context, UIComponent component) {
- StringBuffer result = null;
+ StringBuffer result = new StringBuffer();
CountingOutputWriter customWriter = new CountingOutputWriter();
try {
if (hasChildren(component)) {
@@ -161,7 +165,7 @@
result = customWriter.getContent();
}
} catch (Exception e) {
- e.getMessage();
+ log.error("Error occurred during rendering of progress bar label. It switched to
empty string", e);
}
return result;
Show replies by date