You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mb...@apache.org on 2005/09/12 18:45:18 UTC
svn commit: r280365 -
/myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
Author: mbr
Date: Mon Sep 12 09:45:13 2005
New Revision: 280365
URL: http://svn.apache.org/viewcvs?rev=280365&view=rev
Log:
fix for MYFACES-554
Modified:
myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
Modified: myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java?rev=280365&r1=280364&r2=280365&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/UISelectMany.java Mon Sep 12 09:45:13 2005
@@ -262,11 +262,16 @@
public Object getConvertedValue(FacesContext context, String value)
{
Object convertedValue = UISelectMany.this.getConvertedValue(context, new String[] {value});
- if(convertedValue != null)
+ if(convertedValue instanceof Collection)
{
- return ((Object[])convertedValue)[0];
+ Iterator iter = ((Collection)convertedValue).iterator();
+ if(iter.hasNext())
+ {
+ return iter.next();
+ }
+ return null;
}
- return null;
+ return ((Object[])convertedValue)[0];
}
};