You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/04/27 17:05:48 UTC
svn commit: r938494 -
/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Author: lofwyr
Date: Tue Apr 27 15:05:47 2010
New Revision: 938494
URL: http://svn.apache.org/viewvc?rev=938494&view=rev
Log:
TOBAGO-877: Better support of typed literals in <tc:selectItem> and <f:selectItem>
- fix for multiselects
Modified:
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?rev=938494&r1=938493&r2=938494&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Tue Apr 27 15:05:47 2010
@@ -1409,7 +1409,12 @@ public class ComponentUtil {
try {
Renderer renderer = getRenderer(facesContext, component);
if (renderer != null) {
- return renderer.getConvertedValue(facesContext, component, stringValue);
+ if (component instanceof UISelectMany) {
+ final Object converted = renderer.getConvertedValue(facesContext, component, new String[]{stringValue});
+ return ((Object[])converted)[0];
+ } else {
+ return renderer.getConvertedValue(facesContext, component, stringValue);
+ }
} else {
Converter converter = component.getConverter();
if (converter == null) {