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

Closed
spring-issuemaster opened this issue Apr 14, 2008 · 2 comments

Comments

@spring-issuemaster
Copy link
Collaborator

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
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

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.

Juergen

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

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
Projects
None yet
2 participants
You can’t perform that action at this time.