Author: abelevich
Date: 2008-10-22 04:29:00 -0400 (Wed, 22 Oct 2008)
New Revision: 10858
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
Log:
fix NPE
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162610#...
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
---
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-10-21
22:47:16 UTC (rev 10857)
+++
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-10-22
08:29:00 UTC (rev 10858)
@@ -525,13 +525,7 @@
throw new NullPointerException();
}
- // Submitted value == null means "the component was not submitted
- // at all"; validation should not continue
-
//
http://jira.jboss.com/jira/browse/RF-3852
-// if (submittedValueHolder == null) {
-// return;
-// }
Object previousValue = getValue();
Object newValue = null;
@@ -572,10 +566,15 @@
}
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()) {
+
setSelection(submittedValueHolder.selection);
setActiveItem(submittedValueHolder.activeItem);