Author: dsvyatobatsko
Date: 2008-03-17 11:17:20 -0400 (Mon, 17 Mar 2008)
New Revision: 6863
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
Log:
http://jira.jboss.com/jira/browse/RF-2535
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17
14:51:44 UTC (rev 6862)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17
15:17:20 UTC (rev 6863)
@@ -27,6 +27,8 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.richfaces.renderkit.AbstractProgressBarRenderer;
/**
@@ -38,6 +40,9 @@
// TODO add @since declaration
public abstract class UIProgressBar extends UIPoll {
+ /** Logger */
+ private final Log logger = LogFactory.getLog(UIProgressBar.class);
+
/** Component type */
public static final String COMPONENT_TYPE = "org.richfaces.ProgressBar";
@@ -93,7 +98,6 @@
String clientId = this.getClientId(facesContext);
if (!params.containsKey(clientId)) {
- System.out.println("Return from broadcast");
return;
}
@@ -112,19 +116,20 @@
.setResponseData(getResponseData(value, facesContext));
Object reRender = this.getAttributes().get(AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE);
- Set ajaxRegions = AjaxRendererUtils.asSet(reRender);
+ Set<String> ajaxRegions = AjaxRendererUtils.asSet(reRender);
if (ajaxRegions != null) {
- for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
- String id = iter.next().toString();
+ for (Iterator<String> iter = ajaxRegions.iterator(); iter.hasNext();) {
+ String id = iter.next();
ajaxContext.addComponentToAjaxRender(this, id);
}
}
} else if (params.containsKey(FORCE_PERCENT_PARAM)) {
- System.out.println("Force state: " + this.getClientId(facesContext));
- ajaxContext.addComponentToAjaxRender(this);
+ if (logger.isDebugEnabled()) {
+ logger.debug("Force state: " +
this.getClientId(facesContext));
+ }
+ ajaxContext.addComponentToAjaxRender(this);
}
-
}
}