From bfdd49d7de660d70bf5866cfd1f81687b9614ea6 Mon Sep 17 00:00:00 2001 From: James Holmes Date: Wed, 18 Jul 2007 17:59:52 +0000 Subject: [PATCH] Fix test failures caused by the fix for WW-1618. It turns out that the doubleId was not being handled consistent with the way id is handled. I updated DoubleListUIBean.java to handle doubleId the same way as id. Basically doubleId will now be assigned the same value as doubleName if doubleId does not have a value. git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@557341 13f79535-47bb-0310-9956-ffa450edef68 --- .../struts2/components/DoubleListUIBean.java | 2 + .../struts2/views/jsp/ui/DoubleSelect-1.txt | 2 +- .../struts2/views/jsp/ui/DoubleSelect-2.txt | 2 +- .../struts2/views/jsp/ui/DoubleSelect-3.txt | 82 +++++++++---------- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java index 907c8a935..60a74bcd6 100644 --- a/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java +++ b/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java @@ -192,6 +192,8 @@ public abstract class DoubleListUIBean extends ListUIBean { } } else if (form != null) { addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName)); + } else { + addParameter("doubleId", escape(doubleName != null ? findString(doubleName) : null)); } if (doubleOnclick != null) { diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-1.txt index 3d4b5b6fd..d6e8cfefc 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-1.txt @@ -6,7 +6,7 @@
- - - + + + + +
+ + + +