@ RequestMapping ( value = "/api/profile" , method = RequestMethod . POST ) public @ ResponseBody HashMap < String , Object > addProfile ( Model model , String name ) throws Exception { logger . info ( "Should be adding the profile name when I hit the enter button={}" , name ) ; return Utils . getJQGridJSON ( profileService . add ( name ) , "profile" ) ; }
Add profile to database return collection of profile data . Called when enter is hit in the UI instead of submit button