I was not able to see a spring section. I saw some posts here related to spring, so i am posting it here. I have a requirement. I am working with Java-Spring MVC 3.0 framework. And i am working with form tags too in my JSP.

I have the following requirements:
1. I have 2 dropdown lists A and B. On selecting a option from A, the child elements of A should dynamically populate in B.
2. Then, i have 2 lists C and D. On selecting an option from B, the child elements of B should dynamically populate in C.
3. If i click an option from list C and click on ADD button, the option should move to List D and vice-versa.
4. Finally when i click on SAVE button, i should get the options in list D.

I read somewhere that jstl tags do not support dynamic populating. So, what could be the best way to achieve this using spring binding?

Any ideas or refernce links would be of great help.

Thanks & Regards,

hi Yogeshp,
your question sounds like should use Ajax,
could your code how you tried

Hi Anand,

Thanks a lot for your reply. I had read it one of the articles that ajax would help in this. Unfortunately, i have very less knowledge of ajax. I would be very happy if you can help me with any such dynamic populating examples where ajax is used for the same. The code that i have tried is too long and complex to be posted here. I had tried form submission on every action. I can tell you what and how i have achieved a few things:

  1. On selecting an option in list A, the form gets submitted and the page reloads again with list B populated with the child elements of A.
  2. When i select option from list B, the form gets submitted again and the list C gets populated with the child elements of B.
  3. Then i select an option in list C and click on ADD button, but this does not transfer the option from list C to list D.

Thanks & Regards,

Use jQuery, its free and very easy to use.
jQuery has built in support for AJAX.
You can down load jQuery from here-->:http://jquery.com/download/

and there are many ajax samples on jquery site which you can try yourself