具有AJAX集成的Spring

So I'm able to successfully integrate AJAX requests with Spring MVC. However, I have a problem- if I click the "submit" button of my form, my @Controller class detects the url and returns a ModelAndView. However, what I want is that there be an AJAX check first, and if the form submission is not successful (e.g., blank fields), return an AJAX response. Otherwise, proceed as per normal and display a ModelAndView. However, I have no clue how to integrate both at the same time.

Any ideas or tutorials are appreciated.

Thanks!

查看全部
weixin_33712987
weixin_33712987
2012/12/22 21:28
  • spring
  • ajax
  • 点赞
  • 收藏
  • 回答
    私信

2个回复