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:18:45 UTC
svn commit: r938368 -
/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
Author: lofwyr
Date: Tue Apr 27 09:18:45 2010
New Revision: 938368
URL: http://svn.apache.org/viewvc?rev=938368&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/renderkit/html/HtmlRendererUtil.java
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java?rev=938368&r1=938367&r2=938368&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Tue Apr 27 09:18:45 2010
@@ -620,7 +620,7 @@ public final class HtmlRendererUtil {
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 = ComponentUtil.getConvertedValue(facesContext, component, (String)itemValue);
}
String formattedValue = RenderUtil.getFormattedValue(facesContext, component, itemValue);