]
Alexander Dubovsky closed RF-4520.
----------------------------------
Assignee: Alexander Dubovsky (was: Tsikhon Kuprevich)
OrderingList causes a "invalid value expression"
------------------------------------------------
Key: RF-4520
URL:
https://jira.jboss.org/jira/browse/RF-4520
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Windows XP SP2, Vista SP1, Eclipse 3.3 (Europe), Sun JDK 1.5.015,
IBM JVM (WebSphere 6.1)
Reporter: Fabian Glanzmann
Assignee: Alexander Dubovsky
Original Estimate: 2 hours
Remaining Estimate: 2 hours
ManagedBean contains List of Objects
- Rendering: IO
- Extend with a4j:support works on client side
- server side a "invalid value expression" is produced
Affected class: UIOrderingBaseComponent
Affected method: isSuitableValue(Object value, Object restoredObject) (Line: 76)
return ((Collection) value).contains(restoredObject);
value contains specified Objects whearas restoredObject is a java.lang.String. So the
string is compared against the object instead of the opposite!
Internally the following code is proceeded: restoredObject.equals(object)
Solutions:
- convert the Collection to a Array
- work with HashMaps whereas the key is represented by the string of the object
(myObject.toString)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: