Author: abelevich
Date: 2007-05-24 14:36:21 -0400 (Thu, 24 May 2007)
New Revision: 878
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java
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:
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java
(rev 0)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java 2007-05-24
18:36:21 UTC (rev 878)
@@ -0,0 +1,23 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source:
/cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/component/Sortable.java,v
$
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.component;
+
+import org.richfaces.model.SortOrder;
+
+
+/**
+ * @author Maksim Kaszynski
+ * Base interface for sort capable components
+ */
+public interface Sortable {
+ public SortOrder getSortOrder();
+ public void setSortOrder(SortOrder sortOrder);
+}
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-24
18:36:06 UTC (rev 877)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-24
18:36:21 UTC (rev 878)
@@ -19,14 +19,17 @@
import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.apache.commons.collections.iterators.IteratorChain;
+import org.richfaces.event.sort.SortEvent;
+import org.richfaces.model.SortOrder;
+
/**
* @author Anton Belevich
*
*/
-public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent{
+public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent,
Sortable{
private Integer _row_count = new Integer(0) ;
@@ -128,16 +131,24 @@
public void queueEvent(FacesEvent event) {
if(event instanceof AjaxEvent){
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ }else if(event instanceof SortEvent){
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
}
super.queueEvent(event);
}
public void walk(FacesContext faces, DataVisitor visitor, Object argument) throws
IOException {
-
super.walk(faces, visitor, argument);
}
public DataModel getStoredDataModel() {
return super.getDataModel();
}
+ public SortOrder getSortOrder() {
+ return null;
+ }
+
+ public void setSortOrder(SortOrder sortOrder) {
+ }
+
}
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-24
18:36:06 UTC (rev 877)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-05-24
18:36:21 UTC (rev 878)
@@ -27,7 +27,6 @@
*/
public void setBreakBefore(boolean arg0) {
// TODO Auto-generated method stub
-
}
public Iterator getChildIterator(){
Show replies by date