Author: pyaschenko
Date: 2010-12-03 12:53:27 -0500 (Fri, 03 Dec 2010)
New Revision: 20377
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js
trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/push.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.js
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenu.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenuItem.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tooltip.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js
Log:
http://jira.jboss.com/jira/browse/RF-9858
detach calls moved to global cleanup functionality
Modified: trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-12-03 17:34:09
UTC (rev 20376)
+++ trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-12-03 17:53:27
UTC (rev 20377)
@@ -67,6 +67,14 @@
}
//dom cleaner
+ richfaces.cleanComponent = function (source) {
+ var component = richfaces.$(source);
+ if (component) {
+ richfaces.invokeMethod(component, "destroy");
+ richfaces.invokeMethod(component, "detach", source);
+ }
+ };
+
richfaces.cleanDom = function(source) {
var e = (typeof source == "string") ? document.getElementById(source) :
jQuery('body').get(0);
if (e) {
@@ -75,9 +83,9 @@
jQuery.cleanData(elements);
jQuery.cleanData([e]);
jQuery.each(elements, function(index) {
- richfaces.invokeMethod(this, "destroy");
+ richfaces.cleanComponent(this);
});
- richfaces.invokeMethod(e, "destroy");
+ richfaces.cleanComponent(e);
}
}
}
Modified: trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js
===================================================================
--- trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js 2010-12-03
17:34:09 UTC (rev 20376)
+++ trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -200,7 +200,6 @@
}
this.__contentsElement = null;
- this.detach();
$super.destroy.call(this);
},
Modified: trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/push.js
===================================================================
---
trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/push.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/push.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -231,7 +231,6 @@
this.__unbindErrorHandler();
richfaces.Push.decreaseSubscriptionCounters(this.__address);
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -460,7 +460,6 @@
var itemsContainer = rf.getDomElement(this.id+ID.ITEMS);
$(itemsContainer).removeData();
rf.Event.unbind(itemsContainer.parentNode, this.namespace);
- this.detach()
$super.destroy.call(this);
}
};
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -538,7 +538,6 @@
this.scrollElements = null;
rf.Event.unbind(window.document, "click"+this.namespace);
}
- this.detach();
$super.destroy.call(this);
},
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputBase.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -73,7 +73,6 @@
destroy: function() {
rf.Event.unbindById(this.input, this.namespace);
this.input = null;
- this.detach();
$super.destroy.call(this);
}
}
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -94,7 +94,6 @@
.unbind("mouseup", this.destroy);
this.intervalId = null;
}
- this.detach();
$super.destroy.call(this);
},
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -107,7 +107,6 @@
return this.expandMode;
},
destroy: function() {
- this.detach();
$super.destroy.call(this);
}
};
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -160,7 +160,6 @@
return scrollEventName;
},
destroy: function() {
- this.detach();
$super.destroy.call(this);
}
}
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.js
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datatable.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -96,7 +96,6 @@
}
},
destroy: function() {
- this.detach();
$super.destroy.call(this);
}
}
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.js
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -73,7 +73,6 @@
this.__rootElt = null;
- this.detach();
$superTreeNode.destroy.call(this);
},
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenu.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenu.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenu.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -201,7 +201,6 @@
destroy: function () {
rf.Event.unbindById(this.id, "."+this.namespace);
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenuItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenuItem.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/PanelMenuItem.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -312,7 +312,6 @@
destroy: function () {
delete this.__rfPanelMenu().getItems()[this.itemName];
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -424,7 +424,6 @@
},
destroy: function () {
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanelItem.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -111,7 +111,6 @@
// class stuff
destroy: function () {
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tooltip.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tooltip.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/Tooltip.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -286,7 +286,6 @@
},
destroy: function () {
- this.detach();
$super.destroy.call(this);
}
});
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -184,7 +184,6 @@
this.userOptions = null;
this.eIframe= null;
- this.detach(this.markerId);
$super.destroy.call(this);
},
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-12-03
17:34:09 UTC (rev 20376)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/progressBar.js 2010-12-03
17:53:27 UTC (rev 20377)
@@ -192,7 +192,6 @@
destroy: function() {
this.disable();
this.__elt = null;
- this.detach();
$super.destroy.call(this);
}
}