java - Spring MVC: Multiple Select Controls with the Same Name -


i have screen in spring 2.5 application i'm working on has 1 10 select controls same name. (the number of controls rendered depends on number of relevant objects passed screen.) let's select control's name myvalue, i.e.,

<select id="myvalue" name="myvalue" cssclass="dropdownlist">

is there way make spring mvc automatically set value these controls in command class? i've tried defined data member either string [] myvalue or string myvalue, in either case, data member remains set null. need resort concatenating these values within javascript , saving them hidden input prior submitting form values controller?

after going javascript route , still not getting values returned controller, realized problem due programmer error: had defined getter , setter myvalue data member of command class had defined them private. once switched public designation spring-mvc expecting, able see values in controller method in form of string array...


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -