[richfaces-svn-commits] JBoss Rich Faces SVN: r936 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue May 29 13:28:30 EDT 2007


Author: abelevich
Date: 2007-05-29 13:28:30 -0400 (Tue, 29 May 2007)
New Revision: 936

Modified:
   trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/DataCash.js
Log:


Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/DataCash.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/DataCash.js	2007-05-29 17:28:22 UTC (rev 935)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/DataCash.js	2007-05-29 17:28:30 UTC (rev 936)
@@ -20,10 +20,18 @@
 
 Object.extend(ClientUI.controls.grid.DataCash.prototype, {
 	initialize: function(cashSize) {
-		var count = cashSize/PKG_SIZE + 1;
+		var count = cashSize/this.PKG_SIZE + 1;
 		this.cash = new Array(count);
 		for(var i=0; i<count; i++) {
-			this.cash[i] = new Array(PKG_SIZE);
+			this.cash[i] = new Array(this.PKG_SIZE);
 		}
+	},
+	getRow: function(index) {
+		var i = parseInt(index/this.PKG_SIZE), j = index%this.PKG_SIZE;
+		return this.cash[i][j];
+	},
+	setRow: function(index, row) {
+		var i = parseInt(index/this.PKG_SIZE), j = index%this.PKG_SIZE;
+		this.cash[i][j] = row;
 	}
 });
\ No newline at end of file




More information about the richfaces-svn-commits mailing list