[richfaces-svn-commits] JBoss Rich Faces SVN: r5615 - trunk/ui/listShuttle/src/main/java/org/richfaces/component.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jan 24 20:20:57 EST 2008


Author: nbelaevski
Date: 2008-01-24 20:20:57 -0500 (Thu, 24 Jan 2008)
New Revision: 5615

Modified:
   trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
Log:
http://jira.jboss.com/jira/browse/RF-2044

Modified: trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java	2008-01-25 01:19:51 UTC (rev 5614)
+++ trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java	2008-01-25 01:20:57 UTC (rev 5615)
@@ -597,7 +597,7 @@
 			setValid(false);
 		}	
 
-		validateValue(context, newTargetValue);
+		validateValue(context, new Object[] {newSourceValue, newTargetValue});
 
 		// If our value is valid, store the new value, erase the
 		// "submitted" value, and emit a ValueChangeEvent if appropriate
@@ -622,6 +622,24 @@
 		}
 	}
 
+	protected boolean isEmpty(Object value) {
+		if (value == null) {
+			return true;
+		} else {
+			Object[] values = (Object[]) value;
+			
+			for (int i = 0; i < values.length; i++) {
+				Object v = values[i];
+				
+				if (!super.isEmpty(v)) {
+					return false;
+				}
+			}
+			
+			return true;
+		}
+	}
+	
 	protected void resetDataModel() {
 		super.resetDataModel();
 




More information about the richfaces-svn-commits mailing list