Author: andrei_exadel
Date: 2008-03-31 10:34:50 -0400 (Mon, 31 Mar 2008)
New Revision: 7468
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
RF-2889
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-31
14:26:50 UTC (rev 7467)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-31
14:34:50 UTC (rev 7468)
@@ -118,23 +118,26 @@
ajaxContext
.setResponseData(getResponseData(value, facesContext));
- Object reRender = this.getAttributes().get(
- AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE);
- Set<String> ajaxRegions = AjaxRendererUtils.asSet(reRender);
-
- if (ajaxRegions != null) {
- for (Iterator<String> iter = ajaxRegions.iterator(); iter
- .hasNext();) {
- String id = iter.next();
- ajaxContext.addComponentToAjaxRender(this, id);
- }
- }
+ AjaxRendererUtils.addRegionsFromComponent(this, facesContext);
} else if (params.containsKey(FORCE_PERCENT_PARAM)) {
if (logger.isDebugEnabled()) {
logger.debug("Force state: "
+ this.getClientId(facesContext));
}
ajaxContext.addComponentToAjaxRender(this);
+ String forcedState = request.getParameter(FORCE_PERCENT_PARAM);
+ if ("complete".equals(forcedState)) {
+ Object reRender = this.getAttributes().get("reRenderAfterComplete");
+ Set<String> ajaxRegions = AjaxRendererUtils.asSet(reRender);
+
+ if (ajaxRegions != null) {
+ for (Iterator<String> iter = ajaxRegions.iterator(); iter
+ .hasNext();) {
+ String id = iter.next();
+ ajaxContext.addComponentToAjaxRender(this, id);
+ }
+ }
+ }
}
}
}
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-31
14:26:50 UTC (rev 7467)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-31
14:34:50 UTC (rev 7468)
@@ -606,20 +606,6 @@
*/
public void encodeCompletedState(FacesContext context,
UIComponent component, boolean isAjaxMode) throws IOException {
- if (isAjaxMode) {
- Object rerenderAfterComplete = component.getAttributes().get(
- "reRenderAfterComplete");
- Set ajaxRegions = AjaxRendererUtils.asSet(rerenderAfterComplete);
-
- if (ajaxRegions != null) {
- for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
- String id = iter.next().toString();
- AjaxContext ajaxContext = AjaxContext
- .getCurrentInstance(context);
- ajaxContext.addComponentToAjaxRender(component, id);
- }
- }
- }
String clientId = component.getClientId(context);
String finishClass = (String) component.getAttributes().get(
"finishClass");
Show replies by date