• Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring ajax call binding with @ModelAttribute  RSS feed

 
Diego Freitas Souza
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I need a solution for this scenario:

I have a form that contains almost 15-20 fields. I have from 0 to 3 files that can be upload.

I would like to use Ajax Call with Spring. In my form.jsp, I'm using the commandName "client".

I'd like to see if there's a way to bind all the values using @ModelAttribute("client") @Valid Client client AND using some @RequestParam("fileUpload1") Mutilpartfile file1 together. Because doing all with requestParam I don't thing will be a good idea since it's to much information.

Thank you so much guys,

 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why it wont work. Spring just binds the html name attribute to an object. In the end they are all just request parameters.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!