mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<option value="FR">France</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="region" class="c2" style="s2">
|
||||
<select name="region" id="region" class="c2" style="s2">
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
var fooGroup = new Array(2 + 0);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<option value="FR" selected="selected">France</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="region">
|
||||
<select name="region" id="region">
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
var fooGroup = new Array(2 + 0);
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
<tr>
|
||||
<td class="tdLabel"><label for="foo_bar" class="label">mylabel:</label></td>
|
||||
<td>
|
||||
<select name="foo.bar" id="foo_bar" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="foo_barRedirect(this.options.selectedIndex)">
|
||||
<option value="BE">Belgium</option>
|
||||
<option value="FR">France</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="region">
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
var foo_barGroup = new Array(2 + 0);
|
||||
for (i = 0; i < (2 + 0); i++)
|
||||
foo_barGroup[i] = new Array();
|
||||
|
||||
foo_barGroup[0][0] = new Option("Antwerp", "AN");
|
||||
foo_barGroup[0][1] = new Option("Gent", "GN");
|
||||
foo_barGroup[0][2] = new Option("Brugge", "BRG");
|
||||
foo_barGroup[1][0] = new Option("Paris", "PA");
|
||||
foo_barGroup[1][1] = new Option("Bordeaux", "BOR");
|
||||
|
||||
var foo_barTemp = document.inputForm.region;
|
||||
foo_barRedirect(0);
|
||||
|
||||
function foo_barRedirect(x) {
|
||||
var selected = false;
|
||||
for (m = foo_barTemp.options.length - 1; m >= 0; m--) {
|
||||
foo_barTemp.options[m] = null;
|
||||
}
|
||||
|
||||
for (i = 0; i < foo_barGroup[x].length; i++) {
|
||||
foo_barTemp.options[i] = new Option(foo_barGroup[x][i].text, foo_barGroup[x][i].value);
|
||||
}
|
||||
|
||||
if ((foo_barTemp.options.length > 0) && (! selected)) {
|
||||
foo_barTemp.options[0].selected = true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tdLabel"><label for="foo_bar" class="label">mylabel:</label></td>
|
||||
<td>
|
||||
<select name="foo.bar" id="foo_bar" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="foo_barRedirect(this.options.selectedIndex)">
|
||||
<option value="BE">Belgium</option>
|
||||
<option value="FR">France</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="region" id="region">
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
var foo_barGroup = new Array(2 + 0);
|
||||
for (i = 0; i < (2 + 0); i++)
|
||||
foo_barGroup[i] = new Array();
|
||||
|
||||
foo_barGroup[0][0] = new Option("Antwerp", "AN");
|
||||
foo_barGroup[0][1] = new Option("Gent", "GN");
|
||||
foo_barGroup[0][2] = new Option("Brugge", "BRG");
|
||||
foo_barGroup[1][0] = new Option("Paris", "PA");
|
||||
foo_barGroup[1][1] = new Option("Bordeaux", "BOR");
|
||||
|
||||
var foo_barTemp = document.inputForm.region;
|
||||
foo_barRedirect(0);
|
||||
|
||||
function foo_barRedirect(x) {
|
||||
var selected = false;
|
||||
for (m = foo_barTemp.options.length - 1; m >= 0; m--) {
|
||||
foo_barTemp.options[m] = null;
|
||||
}
|
||||
|
||||
for (i = 0; i < foo_barGroup[x].length; i++) {
|
||||
foo_barTemp.options[i] = new Option(foo_barGroup[x][i].text, foo_barGroup[x][i].value);
|
||||
}
|
||||
|
||||
if ((foo_barTemp.options.length > 0) && (! selected)) {
|
||||
foo_barTemp.options[0].selected = true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user