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 2014/11/25 12:17:46 UTC

svn commit: r1641575 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java

Author: lofwyr
Date: Tue Nov 25 11:17:46 2014
New Revision: 1641575

URL: http://svn.apache.org/r1641575
Log:
TOBAGO-1425: tx:selectManyShuttle does not submit selected values

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java?rev=1641575&r1=1641574&r2=1641575&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java Tue Nov 25 11:17:46 2014
@@ -72,7 +72,7 @@ public class SelectManyShuttleRenderer e
       style.setHeight(style.getHeight().subtract(labelHeight));
       style.setTop(style.getTop().add(labelHeight));
     }
-    final Iterable<SelectItem> items = SelectItemUtils.getItemIterator(facesContext, select);
+    Iterable<SelectItem> items = SelectItemUtils.getItemIterator(facesContext, select);
     final boolean disabled = !items.iterator().hasNext() || select.isDisabled() || select.isReadonly();
 
     final String unselectedLabel = select.getUnselectedLabel();
@@ -140,6 +140,7 @@ public class SelectManyShuttleRenderer e
     writer.writeStyleAttribute(style);
     writer.writeClassAttribute(Classes.create(select, "selected"));
     writer.writeAttribute(HtmlAttributes.MULTIPLE, HtmlAttributes.MULTIPLE, false);
+    items = SelectItemUtils.getItemIterator(facesContext, select);
     HtmlRendererUtils.renderSelectItems(select, items, values, true, writer, facesContext);
 
     writer.endElement(HtmlElements.SELECT);
@@ -151,6 +152,7 @@ public class SelectManyShuttleRenderer e
     writer.writeAttribute(HtmlAttributes.MULTIPLE, HtmlAttributes.MULTIPLE, false);
     writer.writeAttribute(HtmlAttributes.REQUIRED, select.isRequired());
     HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
+    items = SelectItemUtils.getItemIterator(facesContext, select);
     HtmlRendererUtils.renderSelectItems(select, items, values, writer, facesContext);
 
     writer.endElement(HtmlElements.SELECT);