struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgie...@apache.org
Subject svn commit: r509957 - in /struts/struts2/trunk/core/src/main: java/org/apache/struts2/util/ContainUtil.java resources/template/simple/select.ftl
Date Wed, 21 Feb 2007 10:08:06 GMT
Author: rgielen
Date: Wed Feb 21 02:08:06 2007
New Revision: 509957

URL: http://svn.apache.org/viewvc?view=rev&rev=509957
Log:
WW-1747 / WW-1711:
- applied Stuart Piltch's patch to add an additional string representation comparison in ContainUtil
- removed now unnecessary second check in select freemarker template

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java
    struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java?view=diff&rev=509957&r1=509956&r2=509957
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/ContainUtil.java Wed Feb
21 02:08:06 2007
@@ -94,6 +94,9 @@
                     return true;
                 }
             }
+        } else if (obj1.toString().equals(obj2.toString())) {
+            //log.debug("obj1 is an object and it's String representation equals obj2's String
representation.");
+            return true;
         } else if (obj1.equals(obj2)) {
             //log.debug("obj1 is an object and equals obj2");
             return true;

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=509957&r1=509956&r2=509957
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/select.ftl Wed Feb 21 02:08:06
2007
@@ -57,7 +57,7 @@
             <#assign itemValue = stack.findString('top')/>
         </#if>
     <option value="${itemKey?html}"<#rt/>
-        <#if tag.contains(parameters.nameValue, itemKey) == true || (parameters.nameValue?exists
&& parameters.nameValue?string == itemKey?string)>
+        <#if tag.contains(parameters.nameValue, itemKey) == true>
  selected="selected"<#rt/>
         </#if>
     >${itemValue?html}</option><#lt/>



Mime
View raw message