Author: nbelaevski
Date: 2010-11-26 11:48:59 -0500 (Fri, 26 Nov 2010)
New Revision: 20185
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js
Log:
Added parameters support for 'enable' CS-API function
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-11-26
16:36:57 UTC (rev 20184)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-11-26
16:48:59 UTC (rev 20185)
@@ -69,6 +69,8 @@
private static final JSReference AFTER_UPDATE_HANDLER = new
JSReference("afterUpdateHandler");
+ private static final JSReference PARAMS = new JSReference("params");
+
private static final ProgressBarStateEncoder FULL_ENCODER = new
ProgressBarStateEncoder(false);
private static final ProgressBarStateEncoder PARTIAL_ENCODER = new
ProgressBarStateEncoder(true);
@@ -131,6 +133,7 @@
AjaxEventOptions eventOptions = AjaxRendererUtils.buildEventOptions(facesContext,
component);
eventOptions.set("beforedomupdate", BEFORE_UPDATE_HANDLER);
eventOptions.set("complete", AFTER_UPDATE_HANDLER);
+ eventOptions.setClientParameters(PARAMS);
ajaxFunction.addParameter(eventOptions);
return ajaxFunction.toScript();
}
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js 2010-11-26
16:36:57 UTC (rev 20184)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js 2010-11-26
16:48:59 UTC (rev 20185)
@@ -26,7 +26,7 @@
this.__setValue(this.options.value);
if (this.options.submitFunction) {
- this.submitFunction = new Function("beforeUpdateHandler",
"afterUpdateHandler", "event", this.options.submitFunction);
+ this.submitFunction = new Function("beforeUpdateHandler",
"afterUpdateHandler", "params", "event",
this.options.submitFunction);
this.__poll();
}
@@ -68,7 +68,8 @@
},
__submit: function() {
- this.submitFunction.call(this, $.proxy(this.__beforeUpdate, this),
$.proxy(this.__afterUpdate, this));
+ this.submitFunction.call(this, $.proxy(this.__beforeUpdate, this),
$.proxy(this.__afterUpdate, this),
+ this.__params || {});
},
__poll: function(immediate) {
@@ -151,7 +152,8 @@
},
disable: function () {
- if (this.__pollTimer) {
+ this.__params = null;
+ if (this.__pollTimer) {
clearTimeout(this.__pollTimer);
this.__pollTimer = null;
}
@@ -159,11 +161,12 @@
this.enabled = false;
},
- enable: function () {
+ enable: function (params) {
if (this.isEnabled()) {
return;
}
+ this.__params = params;
this.enabled = true;
if (this.isAjaxMode()) {
Show replies by date