Author: vbaranov
Date: 2008-03-20 10:31:34 -0400 (Thu, 20 Mar 2008)
New Revision: 7003
Modified:
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
Log:
http://jira.jboss.com/jira/browse/RF-1458
Modified:
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
===================================================================
---
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2008-03-20
14:26:15 UTC (rev 7002)
+++
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2008-03-20
14:31:34 UTC (rev 7003)
@@ -30,13 +30,18 @@
};
Richfaces.componentControl.attachEvent = function(attachTo, aevent, forAttr, operation,
params, disableDefault) {
- jQuery(attachTo).bind(Richfaces.effectEventOnOut(aevent),function(cevent) {
- Richfaces.componentControl.performOperation(cevent, forAttr, operation, params,
disableDefault);
- }).each(function() {
- Richfaces.componentControl.applyDecorations(this, forAttr, function(element) {
- //TODO: handle component decoration
+ var pattern = /\s*,\s*/;
+ // "attachTo" attribute may contain several ids splitted by ","
+ result = attachTo.split(pattern);
+ for(i=0; i < result.length; i++) {
+ jQuery(result[i]).bind(Richfaces.effectEventOnOut(aevent),function(cevent) {
+ Richfaces.componentControl.performOperation(cevent, forAttr, operation, params,
disableDefault);
+ }).each(function() {
+ Richfaces.componentControl.applyDecorations(this, forAttr, function(element) {
+ //TODO: handle component decoration
+ });
});
- });
+ }
};
Richfaces.componentControl.performOperation = function( cevent, forAttr, operation,
params, disableDefault) {