Author: nbelaevski
Date: 2008-04-30 18:35:05 -0400 (Wed, 30 Apr 2008)
New Revision: 8392
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
Log:
http://jira.jboss.com/jira/browse/RF-3170
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-04-30
19:39:20 UTC (rev 8391)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataGrid.java 2008-04-30
22:35:05 UTC (rev 8392)
@@ -23,7 +23,9 @@
import java.util.Iterator;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
+import javax.faces.el.ValueBinding;
import org.ajax4jsf.component.SequenceDataAdaptor;
@@ -70,4 +72,35 @@
return getFacets().values().iterator();
}
+ public void setValueExpression(String name, ValueExpression binding) {
+ if ("elements".equals(name)) {
+ super.setValueExpression("rows", binding);
+ } else {
+ super.setValueExpression(name, binding);
+ }
+ }
+
+ public ValueExpression getValueExpression(String name) {
+ if ("elements".equals(name)) {
+ return super.getValueExpression("rows");
+ } else {
+ return super.getValueExpression(name);
+ }
+ }
+
+ public void setValueBinding(String name, ValueBinding binding) {
+ if ("elements".equals(name)) {
+ super.setValueBinding("rows", binding);
+ } else {
+ super.setValueBinding(name, binding);
+ }
+ }
+
+ public ValueBinding getValueBinding(String name) {
+ if ("elements".equals(name)) {
+ return super.getValueBinding("rows");
+ } else {
+ return super.getValueBinding(name);
+ }
+ }
}