mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-2482:
Fix Freemarker exception when model list entry has null value field git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@620838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<#assign itemKey = stack.findValue('top')/>
|
||||
</#if>
|
||||
<#if parameters.listValue?exists>
|
||||
<#assign itemValue = stack.findString(parameters.listValue)/>
|
||||
<#assign itemValue = stack.findString(parameters.listValue)?default("")/>
|
||||
<#else>
|
||||
<#assign itemValue = stack.findString('top')/>
|
||||
</#if>
|
||||
@@ -52,4 +52,4 @@
|
||||
</@s.iterator>
|
||||
<#else>
|
||||
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
@@ -140,7 +140,8 @@ public class CheckboxListTest extends AbstractUITagTest {
|
||||
testAction.setFoo("hello");
|
||||
testAction.setList(new String[][]{
|
||||
{"hello", "world"},
|
||||
{"foo", "bar"}
|
||||
{"foo", "bar"},
|
||||
{"baz", null}
|
||||
});
|
||||
|
||||
CheckboxListTag tag = new CheckboxListTag();
|
||||
|
||||
@@ -5,5 +5,7 @@
|
||||
<label for="foo-1" class="checkboxLabel">world</label>
|
||||
<input type="checkbox" name="foo" value="foo" id="foo-2" title="mytitle" onchange="alert('foo');"/>
|
||||
<label for="foo-2" class="checkboxLabel">bar</label>
|
||||
<input type="checkbox" name="foo" value="baz" id="foo-3" title="mytitle" onchange="alert('foo');"/>
|
||||
<label for="foo-3" class="checkboxLabel"></label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user