You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by he...@apache.org on 2007/02/16 17:15:26 UTC

svn commit: r508467 - /struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl

Author: hermanns
Date: Fri Feb 16 08:15:25 2007
New Revision: 508467

URL: http://svn.apache.org/viewvc?view=rev&rev=508467
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/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=508467&r1=508466&r2=508467
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl Fri Feb 16 08:15:25 2007
@@ -57,7 +57,7 @@
             <#assign itemValue = stack.findString('top')/>
         </#if>
     <option value="${itemKey?html}"<#rt/>
-        <#if parameters.nameValue?exists && tag.contains(parameters.nameValue?string, itemKey) == true>
+        <#if tag.contains(parameters.nameValue, itemKey) == true || (parameters.nameValue?exists && parameters.nameValue?string == itemKey)>
  selected="selected"<#rt/>
         </#if>
     >${itemValue?html}</option><#lt/>