Author: abelevich
Date: 2007-05-23 13:55:41 -0400 (Wed, 23 May 2007)
New Revision: 850
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
Log:
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-05-23
17:55:07 UTC (rev 849)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-23
17:55:41 UTC (rev 850)
@@ -15,6 +15,7 @@
import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.apache.commons.collections.iterators.IteratorChain;
@@ -25,7 +26,7 @@
*
*/
-public class UIScrollableGrid extends UIRepeat{
+public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent{
private Integer _row_count = new Integer(0) ;
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
===================================================================
---
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-05-23
17:55:07 UTC (rev 849)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-05-23
17:55:41 UTC (rev 850)
@@ -5,11 +5,14 @@
import java.util.Iterator;
+import org.richfaces.event.sort.SortListener;
+import org.richfaces.event.sort.SortSource;
+
/**
* @author Anton Belevich
*
*/
-public class UIScrollableGridColumn extends UIColumn {
+public class UIScrollableGridColumn extends UIColumn implements SortSource{
/* (non-Javadoc)
* @see org.richfaces.component.Column#isBreakBefore()
@@ -34,5 +37,17 @@
public Iterator getFacetIterator() {
return getFacets().values().iterator();
}
+
+ public void addSortListener(SortListener listener) {
+ addFacesListener(listener);
+ }
+
+ public SortListener[] getSortListeners() {
+ return (SortListener[]) getFacesListeners(SortListener.class);
+ }
+
+ public void removeSortListener(SortListener listener) {
+ removeFacesListener(listener);
+ }
}