Author: abelevich
Date: 2007-07-05 13:42:29 -0400 (Thu, 05 Jul 2007)
New Revision: 1491
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
Log:
add support for storing scroll position
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
---
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-05
17:35:23 UTC (rev 1490)
+++
branches/3.0.2/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-05
17:42:29 UTC (rev 1491)
@@ -59,6 +59,8 @@
private int reqRowsCount = -1;
+ private String scrollPos;
+
public int getReqRowsCount() {
return reqRowsCount;
}
@@ -200,9 +202,10 @@
public Object saveState(FacesContext context) {
- Object values[] = new Object[2];
+ Object values[] = new Object[3];
values[0] = super.saveState(context);
values[1] = getRanges();
+ values[2] = scrollPos;
return (Object)values;
@@ -212,7 +215,7 @@
Object values[] = (Object[])state;
super.restoreState(context, values[0]);
setRanges((List)values[1]);
-
+ scrollPos = (String)values[2];
}
protected Iterator dataChildren() {
@@ -355,4 +358,12 @@
public void setRanges(List ranges) {
this.ranges = ranges;
}
+
+ public String getScrollPos() {
+ return scrollPos;
+ }
+
+ public void setScrollPos(String scrollPos) {
+ this.scrollPos = scrollPos;
+ }
}
Show replies by date