Author: nbelaevski
Date: 2008-01-24 20:19:51 -0500 (Thu, 24 Jan 2008)
New Revision: 5614
Modified:
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
Log:
http://jira.jboss.com/jira/browse/RF-2044
Modified:
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
---
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-24
23:52:50 UTC (rev 5613)
+++
branches/3.1.x/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-25
01:19:51 UTC (rev 5614)
@@ -598,7 +598,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
@@ -623,6 +623,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();