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 11:07:17 UTC

svn commit: r938364 - /myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java

Author: lofwyr
Date: Tue Apr 27 09:07:16 2010
New Revision: 938364

URL: http://svn.apache.org/viewvc?rev=938364&view=rev
Log:
TOBAGO-877: Better support of typed literals in <tc:selectItem> and <f:selectItem>
 - fix for multiselects

Modified:
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java

Modified: myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java?rev=938364&r1=938363&r2=938364&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Tue Apr 27 09:07:16 2010
@@ -391,7 +391,7 @@ public final class HtmlRendererUtils {
         writer.startElement(HtmlConstants.OPTION, null);
         Object itemValue = item.getValue();
         // when using selectItem tag with a literal value: use the converted value
-        if (itemValue instanceof String && values.length > 0 && !(values[0] instanceof String)) {
+        if (itemValue instanceof String && values != null && values.length > 0 && !(values[0] instanceof String)) {
           itemValue = ComponentUtils.getConvertedValue(facesContext, component, (String)itemValue);
         }
         String formattedValue = RenderUtil.getFormattedValue(facesContext, component, itemValue);