I'm running into an issue with SpringMVC, and I would like to know if others have also.
I have a <form:select> binded to a bean property. In the jsp, after the user entered some inputs, the select is populated with <options> via javascript.
When I post the form, I try to validate it server-side, and in case of errors, the same jsp is displayed with the <form:errors> fields showing the different errors to be fixed.
The problem I have is that when displaying back the jsp, the value that was previously choosen in the <form:select> is lost.
This must be related to the fact that there are no <form:options> when the page is generated, as they are loaded via js.
What are the solutions to handle this particular case? Must I absolutely load the select <options> server side ?
I haven't found much on this issue on the internet, and I can't believe I am the only one running into it...