Author: abelevich
Date: 2010-05-13 12:54:13 -0400 (Thu, 13 May 2010)
New Revision: 17026
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.js
Log:
use jQuery each()
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.js
===================================================================
---
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.js 2010-05-13
16:35:39 UTC (rev 17025)
+++
root/ui-sandbox/tables/trunk/ui/src/main/resources/META-INF/resources/datatable.js 2010-05-13
16:54:13 UTC (rev 17026)
@@ -71,17 +71,17 @@
invokeOnSubTables: function(funcName) {
var elements =
$(document.getElementById(this.id)).children(richfaces.ui.DataTable.SUBTABLE_SELECTOR);
- if(elements && elements.length > 0) {
- for (var key in elements) {
- var element = elements[key];
- if(element && element.richfaces &&
element.richfaces.component) {
- var component = element.richfaces.component;
- if(component instanceof RichFaces.ui.SubTable) {
- this.invokeOnComponent(component, funcName)
+ var invokeOnComponent = this.invokeOnComponent;
+ elements.each(
+ function(){
+ if(this.richfaces && this.richfaces.component) {
+ var component = this.richfaces.component;
+ if(component instanceof RichFaces.ui.SubTable) {
+ invokeOnComponent(component, funcName);
+ }
}
}
- }
- }
+ );
},
invokeOnSubTable: function(id, funcName) {
@@ -97,7 +97,6 @@
}
}
}
-
}
})());
Show replies by date