Author: pyaschenko
Date: 2010-07-20 12:43:58 -0400 (Tue, 20 Jul 2010)
New Revision: 18163
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
Log:
https://jira.jboss.org/browse/RF-8875
destroy improvements
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js
===================================================================
---
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-20
16:36:02 UTC (rev 18162)
+++
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoComplete.js 2010-07-20
16:43:58 UTC (rev 18163)
@@ -191,6 +191,8 @@
name:"AutoComplete",
destroy: function () {
//TODO: add all unbind
+ this.items = null;
+ this.cache = null;
rf.Event.unbind(rf.getDomElement(this.componentId+ID.ITEMS).parentNode,
this.namespace);
$super.destroy.call(this);
},
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js
===================================================================
---
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-20
16:36:02 UTC (rev 18162)
+++
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/org.richfaces/AutoCompleteBase.js 2010-07-20
16:43:58 UTC (rev 18163)
@@ -16,7 +16,6 @@
},
unbindScrollEventHandlers: function(elements, component) {
RichFaces.Event.unbind(elements, component.getNamespace());
- elements = null;
}
});
@@ -223,6 +222,7 @@
hide: function (event) {
if (this.isVisible) {
rf.Event.unbindScrollEventHandlers(this.scrollElements, this);
+ this.scrollElements = null;
$(rf.getDomElement(this.selectId)).hide();
this.isVisible = false;
if (this.options.attachToBody && this.parentElement) {
@@ -237,6 +237,10 @@
destroy: function () {
//TODO: add all unbind
this.parentNode = null;
+ if (this.scrollElements) {
+ rf.Event.unbindScrollEventHandlers(this.scrollElements, this);
+ this.scrollElements = null;
+ }
rf.Event.unbindById(this.options.buttonId, this.namespace);
rf.Event.unbindById(this.fieldId, this.namespace);
rf.Event.unbindById(this.selectId, this.namespace);