Anonymous avatar Anonymous committed f09cb36

Fixed the id that got rendered wrongly. The id should be the name of the field + the key value concatenated.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@296 573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (3)

src/java/template/xhtml/radiomap.vm

             #if( $tag.contains($parameters.nameValue, $itemKey) )checked="checked"#end
             #if ($parameters.name)
                                         name="$!webwork.htmlEncode($parameters.name)"
-                                        id="$!webwork.htmlEncode($parameters.nameValue)$!webwork.htmlEncode($itemKey)"
+                                        id="$!webwork.htmlEncode($parameters.name)$!webwork.htmlEncode($itemKey)"
             #end
             #if ($itemKey)              value="$!webwork.htmlEncode($itemKey)"                #end
             #if ($parameters.disabled)  disabled="disabled"             #end
             #if ($parameters.tabindex)  tabindex="$!webwork.htmlEncode($parameters.tabindex)" #end
             #if ($parameters.onchange)  onchange="$!webwork.htmlEncode($parameters.onchange)" #end
         />
-        <label for="$!webwork.htmlEncode($parameters.nameValue)$!webwork.htmlEncode($itemKey)">$!itemValue</label>
+        <label for="$!webwork.htmlEncode($parameters.name)$!webwork.htmlEncode($itemKey)">$!itemValue</label>
 
         #set ($trash = $stack.pop())
     #end

src/test/com/opensymphony/webwork/views/jsp/ui/Radio-1.txt

     <td>
         <input type="radio"
                name="myname"
-               id="hello"
+               id="mynamehello"
                value="hello"
         />
-        <label for="hello">world</label>
+        <label for="mynamehello">world</label>
 
         <input type="radio"
                name="myname"
-               id="foo"
+               id="mynamefoo"
                value="foo"
         />
-        <label for="foo">bar</label>
+        <label for="mynamefoo">bar</label>
     </td>
 </tr>

src/test/com/opensymphony/webwork/views/jsp/ui/Radio-2.txt

     <td>
         <input type="radio"
                name="myname"
-               id="12"
+               id="myname2"
                value="2"
         />
-        <label for="12">Two</label>
+        <label for="myname2">Two</label>
 
         <input type="radio"
                checked="checked"
                name="myname"
-               id="11"
+               id="myname1"
                value="1"
         />
-        <label for="11">One</label>
+        <label for="myname1">One</label>
     </td>
 </tr>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.