Author: nbelaevski
Date: 2009-05-25 12:47:53 -0400 (Mon, 25 May 2009)
New Revision: 14318
Modified:
branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
Log:
https://jira.jboss.org/jira/browse/RF-7251
Modified:
branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
---
branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2009-05-25
16:37:29 UTC (rev 14317)
+++
branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2009-05-25
16:47:53 UTC (rev 14318)
@@ -280,14 +280,6 @@
this.submittedValueHolder = (SubmittedValue) object;
}
- protected Object saveIterationState() {
- return valueHolder;
- }
-
- protected void restoreIterationState(Object object) {
- this.valueHolder = (ValueHolder) object;
- }
-
public abstract void setImmediate(boolean immediate);
public abstract void setRequired(boolean required);
@@ -444,7 +436,7 @@
ValueBinding vb = getValueBinding("value");
if (vb != null) {
vb.setValue(context, valueHolder.value);
- setValue(null);
+ valueHolder.value = null;
setLocalValueSet(false);
}
}
@@ -557,6 +549,10 @@
throw new NullPointerException();
}
+ if (submittedValueHolder == null) {
+ return;
+ }
+
//
http://jira.jboss.com/jira/browse/RF-3852
Object previousValue = getValue();
@@ -599,10 +595,6 @@
validateValue(context, newValue);
- if (submittedValueHolder == null) {
- return;
- }
-
// If our value is valid, store the new value, erase the
// "submitted" value, and emit a ValueChangeEvent if appropriate
if (isValid()) {
@@ -686,7 +678,9 @@
}
public void setValue(Object value) {
- if (value instanceof ValueHolder) {
+ if (value == null) {
+ this.valueHolder = null;
+ } else if (value instanceof ValueHolder) {
this.valueHolder = (ValueHolder) value;
} else {
createValueHolder();