Author: pyaschenko
Date: 2010-07-21 08:27:44 -0400 (Wed, 21 Jul 2010)
New Revision: 18173
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
Log:
detach method was added
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
---
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-21
12:22:40 UTC (rev 18172)
+++
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-21
12:27:44 UTC (rev 18173)
@@ -209,6 +209,20 @@
}
return element;
},
+
+ /**
+ * Detach component object from DOM element by component id, DOM element or jQuery
object
+ *
+ * @function
+ * @name RichFaces.BaseComponent#detach
+ * @param {string|DOMElement|jQuery} source - component id, DOM element or DOM
elements wrapped by jQuery
+ *
+ * */
+ detach: function(source) {
+ source = source || this.id;
+ var element = richfaces.getDomElement(source);
+ element && element.richfaces && (element.richfaces.component=null);
+ }
/**
* Destroy method. Will be called before remove component from the page
@@ -218,6 +232,7 @@
*
* */
destroy: function() {
+ detach();
}
};
})(params));
Show replies by date