Commits

Anonymous committed 8d67867

WW-1489 (Handling of unchecked checkboxes)

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

Comments (0)

Files changed (7)

src/java/com/opensymphony/webwork/interceptor/BooleanTweaker.java

  * 
  * <ul>
  *      <li>prefix - The prefix that identify the parameter whose corresponding property will be set to false (by default).
- *                   Default to '_FALSE_'</li>
+ *                   Default to '_FALSE_.'</li>
  *      <li>booleanValue - The boolean value to be set (default to 'false')</li>
  * </ul>
  *

src/java/template/simple/checkbox.ftl

+<input type="hidden" name="_FALSE_.${parameters.name?html}" value="false"/>
 <input type="checkbox" name="${parameters.name?html}" value="${parameters.fieldValue?html}"<#rt/>
 <#if parameters.nameValue?exists && parameters.nameValue>
  checked="checked"<#rt/>

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

 	<td valign="top" align="right">
 	</td>
     <td valign="top" align="left">
+        <input type="hidden" name="_FALSE_.foo" value="false"/>
 		<input type="checkbox" name="foo" value="baz" checked="checked" id="someId" title="mytitle" onfocus="test();"/>
         <label for="someId" class="checkboxLabel">mylabel</label>
     </td>

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

 	<td valign="top" align="right">
 	</td>
     <td valign="top" align="left">
+        <input type="hidden" name="_FALSE_.foo" value="false"/>
         <input type="checkbox" name="foo" value="baz" id="foo" title="mytitle"/>
         <label for="foo" class="checkboxLabel">mylabel</label>
     </td>

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

 	
 	</td>
     <td valign="top" align="left">
+          <input type="hidden" name="_FALSE_.foo" value="false"/>  
           <input type="checkbox" name="foo" value="baz" checked="checked" id="foo" title="mytitle" onclick="test();" ondblclick="test();"/>
           <label for="foo" class="checkboxErrorLabel">mylabel</label>
     </td>

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

 </tr>
 <tr>
     <td colspan="2">
+        <input type="hidden" name="_FALSE_.foo" value="false"/>
 		<input type="checkbox" name="foo" value="baz" checked="checked" id="someId" title="mytitle" onfocus="test();"/>
     </td>
 </tr>

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

 	    <label for="someId" class="checkboxLabel">mylabel:</label>
 	</td>
     <td valign="top" align="left">
+        <input type="hidden" name="_FALSE_.foo" value="false"/>
 		<input type="checkbox" name="foo" value="baz" checked="checked" id="someId" title="mytitle" onfocus="test();"/>
     </td>
 </tr>