New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form:select 3.0.1 regression bug when binding to a map [SPR-7040] #11702

spring-issuemaster opened this Issue Mar 26, 2010 · 1 comment


None yet
2 participants
Copy link

spring-issuemaster commented Mar 26, 2010

Jeff Johnston opened SPR-7040 and commented

I found a bug that surfaced in Spring 3.0.1. The problem is with binding a value to a map with the form select tag.

In my JSP I have the following select tag. This will bind to a Map<String, String> field in my command object.

<form:select path="questions[${question.key}]" cssClass="${question.key}" items="${question.answers}" itemValue="key" itemLabel="name"/>

If I do a view source I can clearly see the problem.

In Spring 3.0 I have this:

<select id="questionsARTISAN_ARMOIRE_WOOD" name="questions[ARTISAN_ARMOIRE_WOOD]" class="ARTISAN_ARMOIRE_WOOD"><option value="001" selected="selected">Cherry</option><option value="002">Walnut</option></select>

In Spring 3.0.1 I have this:

<select id="questionsARTISAN_ARMOIRE_WOOD" name="questionsARTISAN_ARMOIRE_WOOD" class="ARTISAN_ARMOIRE_WOOD"><option value="001" selected="selected">Cherry</option><option value="002">Walnut</option></select>

Notice how the name is "questionsARTISAN_ARMOIRE_WOOD" instead of "questions[ARTISAN_ARMOIRE_WOOD]". The brackets got dropped in 3.0.1.

Affects: 3.0.1

Issue Links:

  • #11537 Spring MVC regression: binding to indexed properties is broken ("duplicates")

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Mar 26, 2010

Juergen Hoeller commented

This is an unfortunate regression in 3.0.1 which has been fixed in recent 3.0.2 snapshots already. Feel free to give 3.0.2 early try; it's scheduled for release next week.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment