Commits

Anonymous committed 3330e17

Fixed WW-644: Xhtml generated by the ui tags is (still) invalid. All tests pass.

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

  • Participants
  • Parent commits 25d4664

Comments (0)

Files changed (11)

src/java/template/simple/checkbox.vm

 <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($parameters.fieldValue)"
-#if ($parameters.nameValue)        checked="true"                                           #end
+#if ($parameters.nameValue)        checked="checked"                                        #end
 #if ($parameters.disabled == true) disabled="disabled"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.onchange)         onchange="$!webwork.htmlEncode($parameters.onchange)"    #end

src/java/template/simple/checkboxlist.vm

             #set( $itemValue = $item )
         #end
         <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)"
-        id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="true" #end/>
+        id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="checked" #end/>
         <label for="$!webwork.htmlEncode($parameters.name)-$itemCount" class="checkboxLabel">$!webwork.htmlEncode($itemValue)</label><br />
         #set ($trash = $stack.pop())
     #end

src/java/template/simple/doubleselect.vm

   #else
       #set( $itemValue = $item.toString() )
   #end
-  <option value="$!webwork.htmlEncode($itemValue)"#if( $tag.contains($tag.ActualValue, $itemValue) ) selected#end>$!{itemKey}</option>
+  <option value="$!webwork.htmlEncode($itemValue)"#if( $tag.contains($tag.ActualValue, $itemValue) ) selected="selected"#end>$!{itemKey}</option>
 #end
 </select>
 
 <select name="$!{tag.DoubleName}" #if( $tag.Size > 0 )size="${tag.Size}" #end #if( $tag.Multiple ) multiple#end>
 </select>
 
-<script>
+<script type="text/javascript">
 <!--
 var $!{tag.Name}Group = new Array($items.size())
 for (i = 0; i < $items.size(); i++)

src/java/template/simple/select.vm

             #set( $itemValue = $item )
         #end
 
-        <option value="$!webwork.htmlEncode($itemKey)"
-            #if( $tag.contains($parameters.nameValue, $itemKey) )selected="true"#end
-        >$!webwork.htmlEncode($itemValue)</option>
+        <option value="$!webwork.htmlEncode($itemKey)" #if( $tag.contains($parameters.nameValue, $itemKey) )selected="selected"#end>$!webwork.htmlEncode($itemValue)</option>
 
         #set ($trash = $stack.pop())
     #end

src/java/template/xhtml/checkboxlist.vm

         #end
         <div>
          <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($itemKey)"
-         id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="true" #end/>
+         id="$!webwork.htmlEncode($parameters.name)-$itemCount" #if( $tag.contains($parameters.nameValue, $itemKey) ) checked="checked" #end/>
          <label for="$!webwork.htmlEncode($parameters.name)-$itemCount" class="checkboxLabel">$!webwork.htmlEncode($itemValue)</label>
         </div>
         #set ($trash = $stack.pop())

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

     <td valign="top" colspan="2">
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
-                <td valign="top"><input type="checkbox" name="foo" value="baz" checked="true" id="someId" /></td>
+                <td valign="top"><input type="checkbox" name="foo" value="baz" checked="checked" id="someId" /></td>
                 <td width="100%" valign="top"><label for="someId" class="checkboxLabel">mylabel</label></td>
             </tr>
         </table>

src/test/com/opensymphony/webwork/views/jsp/ui/Checkbox-3.txt

     <td valign="top" colspan="2">
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
-                <td valign="top"><input type="checkbox" name="foo" value="baz" checked="true" /></td>
+                <td valign="top"><input type="checkbox" name="foo" value="baz" checked="checked" /></td>
                 <td width="100%" valign="top"><label class="checkboxErrorLabel">mylabel</label></td>
             </tr>
         </table>

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

     <td align="right" valign="top"><label class="label">mylabel:</label></td>
     <td>
         <div>
-            <input type="checkbox" name="foo" value="hello" id="foo-1" checked="true" />
+            <input type="checkbox" name="foo" value="hello" id="foo-1" checked="checked" />
             <label for="foo-1" class="checkboxLabel">world</label>
         </div>
         <div>

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

     <td align="right" valign="top"><label class="label">mylabel:</label></td>
     <td>
         <div>
-            <input type="checkbox" name="collection" value="hello" id="collection-1" checked="true" />
+            <input type="checkbox" name="collection" value="hello" id="collection-1" checked="checked" />
             <label for="collection-1" class="checkboxLabel">world</label>
         </div>
         <div>
-            <input type="checkbox" name="collection" value="foo" id="collection-2" checked="true" />
+            <input type="checkbox" name="collection" value="foo" id="collection-2" checked="checked" />
             <label for="collection-2" class="checkboxLabel">bar</label>
         </div>
         <div>

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

     <td><select name="foo" >
             <option value="headerKey">headerValue</option>
             <option value=""></option>
-            <option value="hello" selected="true" >world</option>
+            <option value="hello" selected="selected">world</option>
             <option value="foo" >bar</option>
         </select></td>
 </tr>

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

 <tr>
     <td align="right" valign="top"><label class="label">mylabel:</label></td>
     <td><select name="collection" multiple="multiple" >
-            <option value="hello" selected="true" >world</option>
-            <option value="foo" selected="true" >bar</option>
+            <option value="hello" selected="selected">world</option>
+            <option value="foo" selected="selected">bar</option>
             <option value="cat" >dog</option>
         </select></td>
 </tr>