Author: rgielen
Date: Tue Feb 6 06:06:46 2007
New Revision: 504142
URL: http://svn.apache.org/viewvc?view=rev&rev=504142
Log:
Fix for WW-1711:
current option is not selected if actual value to check is no String (aka:
nameValue resolves to type other than String)
Modified:
struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
Modified:
struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl?view=diff&rev=504142&r1=504141&r2=504142
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl Tue
Feb 6 06:06:46 2007
@@ -57,7 +57,7 @@
<#assign itemValue = stack.findString('top')/>
</#if>
<option value="${itemKey?html}"<#rt/>
- <#if tag.contains(parameters.nameValue, itemKey) == true>
+ <#if parameters.nameValue?exists &&
tag.contains(parameters.nameValue.toString(), itemKey) == true>
selected="selected"<#rt/>
</#if>
>${itemValue?html}</option><#lt/>