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
in: web status: declined


Copy link

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:

Copy link
Collaborator Author

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 commented Apr 28, 2008

Matthew Tatum commented

Thanks Juergen,

We can work around that!

@spring-projects-issues spring-projects-issues added type: bug status: declined in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: bug label Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web status: declined
None yet

No branches or pull requests

2 participants