Author: andrei_exadel
Date: 2008-03-10 07:20:19 -0400 (Mon, 10 Mar 2008)
New Revision: 6643
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
RF-2363
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-10
11:17:59 UTC (rev 6642)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-10
11:20:19 UTC (rev 6643)
@@ -34,6 +34,8 @@
import org.ajax4jsf.resource.CountingOutputWriter;
import org.richfaces.component.UIProgressBar;
+import com.sun.facelets.FaceletException;
+
/**
* Abstract progress bar renderer
*
@@ -226,9 +228,14 @@
String clientId = component.getClientId(context);
String containerId = ((UIComponent) AjaxRendererUtils
.findAjaxContainer(context, component)).getClientId(context);
- String formId = ((UIComponent) AjaxRendererUtils
- .getNestingForm(component)).getClientId(context);
String mode = (String) component.getAttributes().get("mode");
+ UIComponent form = AjaxRendererUtils.getNestingForm(component);
+ String formId = null;
+ if (form != null) {
+ formId = form.getClientId(context);
+ }else if ("ajax".equals(mode)){
+ throw new FaceletException("Progress bar component in ajax mode should be
placed inside the form");
+ }
Number minValue = getNumber(component.getAttributes().get("minValue"));
Number maxValue = getNumber(component.getAttributes().get("maxValue"));
Number value =(Number)variables.getVariable("value");
Show replies by date