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 tags path attribute leaving square brackets out of id attribute of html tag [SPR-4698] #9375

spring-projects-issues opened this issue Apr 14, 2008 · 2 comments


Copy link

@spring-projects-issues spring-projects-issues commented Apr 14, 2008

Matthew Tatum opened SPR-4698 and commented

I have a problem that since moving from Spring 2.0 to Spring 2.5 form tags that render collections are working slightly differently.
<form:input path="myCollection[${index}].myValue" />
previously rendered as:
<select id="myCollection[0].myValue" name="myCollection[0].myValue" />
and is now rendering:
<select id="myCollection0.myValue" name="myCollection[0].myValue" />

Notice the lack of square brackets in the id attribute. This may not seem like much but we have a lot of javascript that relies on it rendering the first way!

Affects: 2.5.3

Issue Links:

  • #7069 Using array syntax generates invalid id
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 25, 2008

Juergen Hoeller commented

I'm afraid you'll have to adapt the affected JavaScript, since that change was deliberate... We had to change the id generation strategy to always produce valid HTML ids - which unfortunately means excluding such brackets. Sorry for the inconvenience!

See #7069 for the original issue that triggered this change.


Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Apr 28, 2008

Matthew Tatum commented

Thanks Juergen,

We can work around that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants