[richfaces-svn-commits] JBoss Rich Faces SVN: r9144 - trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Jun 20 10:27:16 EDT 2008


Author: andrei_exadel
Date: 2008-06-20 10:27:16 -0400 (Fri, 20 Jun 2008)
New Revision: 9144

Modified:
   trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
Log:
RF-3740

Modified: trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
--- trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js	2008-06-20 14:18:44 UTC (rev 9143)
+++ trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js	2008-06-20 14:27:16 UTC (rev 9144)
@@ -41,6 +41,17 @@
 	getValue: function () {
 		return this.value;
 	},
+	
+	getParameter: function (ev, params, paramName) {
+		if (!params) {
+			params = ev;
+		}
+		if (params && params[paramName]) {
+			return params[paramName];
+		} 
+		return params;
+	},
+	
 	onComplete: function (data) {
 	  	if (!$(this.id) || this.disabled) { return; } 
 		if (data) {
@@ -135,11 +146,12 @@
 		}
 		return placeholders;
 	},
-	setLabel: function (str) {
+	setLabel: function (ev, str) {
+		str = this.getParameter(ev, str, "label");
 		if (this.state != "progressState") { return; }
 		var d = $(this.id + ":remain");
 		if (!d) { return; } 
-		var lbl = this.interpolate(str, this.getContext());
+		var lbl = this.interpolate(str + "", this.getContext());
 		if (lbl)
 			d.innerHTML = $(this.id + ":complete").innerHTML = lbl;
 		this.markup = null;
@@ -165,7 +177,8 @@
 		}
 		return value;
 	},
-	setValue: function (val) {
+	setValue: function (ev, val) {
+		val = this.getParameter(ev, val, "value");
 		this.value = val;
 		if (!this.isAjaxMode()) {
 			if (parseFloat(val) <=  parseFloat(this.getMinValue())) {




More information about the richfaces-svn-commits mailing list