Author: hermanns
Date: Fri Feb 16 08:25:48 2007
New Revision: 508478
URL: http://svn.apache.org/viewvc?view=rev&rev=508478
Log:
select tag: current option is not selected if actual value to check is no String
(aka: nameValue resolves to type other than String)
o applied patch to submit.ftl submitted by Stuart Piltch
WW-1711
Modified:
struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/select.ftl
Modified:
struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/select.ftl
URL:
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/select.ftl?view=diff&rev=508478&r1=508477&r2=508478
==============================================================================
---
struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/select.ftl
(original)
+++
struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/template/simple/select.ftl
Fri Feb 16 08:25:48 2007
@@ -57,7 +57,7 @@
<#assign itemValue = stack.findString('top')/>
</#if>
<option value="${itemKey?html}"<#rt/>
- <#if tag.contains(parameters.nameValue, itemKey) == true>
+ <#if tag.contains(parameters.nameValue, itemKey) == true ||
(parameters.nameValue?exists && parameters.nameValue?string == itemKey)>
selected="selected"<#rt/>
</#if>
>${itemValue?html}</option><#lt/>