Can I get which button is clicked in the jquery dialog(if ‘OK’ is clicked or ‘Cancel’ is clicked) in my spring controller?? I am doing response.sendRedirect from the controller with a querystring, which i use to check for a condition to show the jquery dialog box. I need to return to this controller function with the value of which button is clicked. Is this possible???
Share
It is possible. Use the jQuery ajax capabilities and invoke a controller method based on that. For example map one method as
@RequestMapping("/foo/ok")and the other as/cancel, and invoke that URL with$.post(..)