Author: maksimkaszynski
Date: 2007-06-12 09:52:54 -0400 (Tue, 12 Jun 2007)
New Revision: 1136
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
Log:
added server-side caching
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-06-12
13:11:14 UTC (rev 1135)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-06-12
13:52:54 UTC (rev 1136)
@@ -27,6 +27,7 @@
import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.event.sort.SortEvent;
import org.richfaces.model.BufferedSequenceRange;
+import org.richfaces.model.DataModelCache;
import org.richfaces.model.GridDataModel;
import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.SortOrder;
@@ -103,7 +104,7 @@
Object value = getValue();
if (value instanceof GridDataModel) {
- return (GridDataModel) value;
+ return new DataModelCache((GridDataModel) value);
}
if (value instanceof ScrollableGridDataModel) {
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-12
13:11:14 UTC (rev 1135)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModel.java 2007-06-12
13:52:54 UTC (rev 1136)
@@ -108,8 +108,7 @@
}
public boolean isRowAvailable() {
- //boolean result
- return mapping != null && mapping.containsKey(getRowKey());
+ return getRowData() != null;
}
public void setRowIndex(int arg0) {