Skip to content
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

Closed
spring-projects-issues opened this issue Mar 26, 2010 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues 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:

@spring-projects-issues
Copy link
Collaborator Author

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.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants