You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bw...@apache.org on 2006/05/10 00:08:19 UTC
svn commit: r405555 -
/tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java
Author: bwallace
Date: Tue May 9 15:08:17 2006
New Revision: 405555
URL: http://svn.apache.org/viewcvs?rev=405555&view=rev
Log:
[TAPESTRY-886] Ported fixes to 4.0 branch to tapestry4/trunk
Modified:
tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java
Modified: tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java?rev=405555&r1=405554&r2=405555&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java (original)
+++ tapestry/tapestry4/trunk/contrib/src/java/org/apache/tapestry/contrib/form/CheckBoxMultiplePropertySelectionRenderer.java Tue May 9 15:08:17 2006
@@ -80,6 +80,8 @@
writer.beginEmpty("input");
writer.attribute("type", "checkbox");
writer.attribute("name", component.getName());
+ String id = component.getName() + "." +model.getValue(index);
+ writer.attribute("id", id);
writer.attribute("value", model.getValue(index));
if (component.isDisabled())
@@ -93,7 +95,10 @@
writer.println();
writer.begin("td");
+ writer.begin("label");
+ writer.attribute("for", id);
writer.print(model.getLabel(index));
+ writer.end(); // <label>
writer.end(); // <td>
writer.end(); // <tr>