title: Display and update multiple form fields on selecting a value from a dropdown in a jsp
body: <p>I am working in Spring MVC 3.0. I have a page with a drop-down, say the master drop-down, and multiple fields that are dependent on the value of the drop-down. When the value of the drop-down is selected, I want to query the database and get around 12 field values and a list and display these fields on the JSP. Also, there are 2 more drop-downs whose list of values depends on the master drop-down.</p>
  
  <p>I have thought of the following approaches:
  1. Making a AJAX call and displaying the 12 fields through AJAX. And making 2 more AJAX calls to get the values of the remaining 2 drop downs.
  2. Making an AJAX call setting a bean object and then including another view containing the 12 fields. And making 2 more AJAX calls to get the values of the remaining drop down. But I am not sure on how to include/render a view through AJAX in Spring MVC.
  3. Having a hidden div containing all the dependent fields and using AJAX to return the values of the fields. But I am not sure on how to return multiple values using AJAX and then using them to update existing fields.</p>
  
  <p>Which approach should I follow or if there is some other way this can be handled?</p>
  
  <p>I am fairly new to Spring MVC and would appreciate any help with a code snippet on this.
  Thanks in advance.</p>