[richfaces-issues] [JBoss JIRA] Commented: (RF-4520) OrderingList causes a "invalid value expression"

Alex Zhang (JIRA) jira-events at lists.jboss.org
Mon Oct 27 09:38:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/RF-4520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12435560#action_12435560 ] 

Alex Zhang commented on RF-4520:
--------------------------------

UPDATE: mine is working now, without the workaround. All I did was overriding equals and hashCode in my business object. Because when I looked into UIOrderingBaseComponent.isSuitableValue() method, it was having trouble match 'value' to 'restoredValue'. 

> 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: Tsikhon Kuprevich
>   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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list