Author: nbelaevski
Date: 2008-01-07 15:25:07 -0500 (Mon, 07 Jan 2008)
New Revision: 5162
Modified:
trunk/framework/impl/src/main/javascript/prototype/patches.js
Log:
http://jira.jboss.com/jira/browse/RF-1841 back compatibility fix
Modified: trunk/framework/impl/src/main/javascript/prototype/patches.js
===================================================================
--- trunk/framework/impl/src/main/javascript/prototype/patches.js 2008-01-07 19:54:55 UTC
(rev 5161)
+++ trunk/framework/impl/src/main/javascript/prototype/patches.js 2008-01-07 20:25:07 UTC
(rev 5162)
@@ -95,8 +95,15 @@
}
var component = node.component;
- if (component && component.destroy) {
- component.destroy();
+ if (component) {
+ var destructorName = component["rich:destructor"];
+ //destructor name is required to be back-compatible
+ if (destructorName) {
+ var destructor = component[destructorName];
+ if (destructor) {
+ destructor.call(component);
+ }
+ }
}
}