You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, spring's tag library is removing the "[" and "]", so what is left over is a giant string value. I must use this pattern since this page has multiple input fields that are totally random based on the list of text chunks.
Each form value is supposed to map to this:
private Map<String,String> answers = new HashMap<String, String>();
Of course, when the server tries to get the values, there are NPE's everywhere due to Spring's stupidity.
How did this break? I was using plain html before, and I just recently switched over to the tag library because it was the only way to get multipart's working correctly. Otherwise, Spring didn't pass the MultipartFile object to the domain object. I tried everything, and this is what fixed it.
Now that I have converted about 50 forms to use the tag library, I have finally arrived to the 1 outlier form that does not covert over successfully. Sigh.
Please tell me how I can get this to work so I can get this production code launched.
I also want to add that putting small quotes like ['${blah}'] does not help. It merely generates studentAnswer.answers'xyz' as the id and name pair for the input element.
What is it doing? I used to call status.expression directly. I had some old Spring 2.5 cold that Jeuron wrote in Freemarker, and I was using that for eternity. Works great, but didn't work with multiparts in 3.0. Now that I use the tag library, I cannot use path expressions I was using before? There is a step in between that the tag library is doing that I really want to prevent now.
This was an unfortunate regression in 3.0.1 that has been fixed in 3.0.2 snapshots already. Spring 3.0.2 is scheduled for release next week; feel free to give a snapshot a try in the meantime!
Ken Egervari opened SPR-6989 and commented
I have some code that purposefully puts "[" and "]" in the path, which eventually gets rendered to the id and name attributes on the input tag.
Code:
At a high level, it gets used like this:
Code:
Unfortunately, spring's tag library is removing the "[" and "]", so what is left over is a giant string value. I must use this pattern since this page has multiple input fields that are totally random based on the list of text chunks.
Each form value is supposed to map to this:
Of course, when the server tries to get the values, there are NPE's everywhere due to Spring's stupidity.
How did this break? I was using plain html before, and I just recently switched over to the tag library because it was the only way to get multipart's working correctly. Otherwise, Spring didn't pass the MultipartFile object to the domain object. I tried everything, and this is what fixed it.
Now that I have converted about 50 forms to use the tag library, I have finally arrived to the 1 outlier form that does not covert over successfully. Sigh.
Please tell me how I can get this to work so I can get this production code launched.
Affects: 3.0.1
Reference URL: http://forum.springsource.org/showthread.php?t=86199
Issue Links:
The text was updated successfully, but these errors were encountered: