Author: abelevich
Date: 2007-05-24 14:36:06 -0400 (Thu, 24 May 2007)
New Revision: 877
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java
Log:
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java 2007-05-24
18:35:53 UTC (rev 876)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/event/sort/SortEvent.java 2007-05-24
18:36:06 UTC (rev 877)
@@ -22,8 +22,10 @@
private static final long serialVersionUID = -1453867412542792281L;
- private String sortField;
+ private int sortColumnIndex;
+ private boolean sortAsc;
+
/**
* @param component
* @param sortField
@@ -31,11 +33,22 @@
*/
public SortEvent(
UIComponent component,
- String sortField) {
+ int sortColumnIndex,
+ boolean sortAsc) {
+
super(component);
- this.sortField = sortField;
+ this.sortColumnIndex = sortColumnIndex;
+ this.sortAsc = sortAsc;
}
+ public boolean isSortAsc() {
+ return sortAsc;
+ }
+
+ public void setSortAsc(boolean sortAsc) {
+ this.sortAsc = sortAsc;
+ }
+
public boolean isAppropriateListener(FacesListener listener) {
return (listener instanceof SortListener);
}
@@ -47,14 +60,14 @@
/**
* @return the sortField
*/
- public String getSortField() {
- return sortField;
+ public int getSortField() {
+ return sortColumnIndex;
}
/**
* @see java.util.EventObject#toString()
*/
public String toString() {
- return "SortEvent: {sortField: " + sortField + "}";
+ return "SortEvent: {sortField: " + sortColumnIndex + "}";
}
}
Show replies by date