简体   繁体   中英

How to retrieve a particular list from serialzed form data sent to controller through jquery ajax call

I have to replace particular part of page on button click event. For that in java script i have a call to ajax where serialzed form data is send to controller . How can i retrieve particular list from form data. After retrieving another object should be added to list and sent to jsp . Can any one please let me know how can I do it.

$.ajax({    
        type:"POST",        
        url: "",    
        data: $('form#regist').serialize(),     
          success: function(success) {    

          }   
       });  

something like below

@RequestMapping(value = "/retrieve", method = RequestMethod.POST)
    public @ResponseBody
    String retrieveList (Object object ModelMap map) {
    return "success";
}

object is the modelAttribute to map, should be same what has serialized in the form, or you can say, same as your commandName of this JSP .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM