Jquery 为什么我的控制器没有';不截取保存行?

Jquery 为什么我的控制器没有';不截取保存行?,jquery,spring,jqgrid,Jquery,Spring,Jqgrid,我正在尝试使用jQgrid进行内联编辑,因此我写了以下内容: ...... colModel :[ ........ {name:'idProvino', index:'idProvino', editable: true}, ....... ], onSelectRow: function(id){ if(las

我正在尝试使用jQgrid进行内联编辑,因此我写了以下内容:

......
     colModel :[
               ........ 
               {name:'idProvino', index:'idProvino', editable: true}, 
               .......
               ],
    onSelectRow: function(id){
                     if(lastsel2 != null){
                         $('#listCong').jqGrid('saveRow',lastsel2);
                     }

                    jQuery('#listCong').jqGrid('restoreRow',lastsel2);
                    jQuery('#listCong').jqGrid('editRow',id,false);
                    lastsel2 = id;
                    },
editurl: '/mywebapp/controller/update/',
这是我的控制器的方法:

    @RequestMapping(value = "/update", method = RequestMethod.POST)
        @ResponseBody
        public void update(@RequestParam(value="id", required=true) Long id,
                @RequestParam(value="idProvino", required=true) String idProvino, 
                @RequestParam(value="oper", required=true) String oper,
                final BindingResult bindingResult, 
                final Model uiModel, final HttpServletRequest httpServletRequest) {

        DO SOMETHING
    }
但它不会拦截来自jQgrid的请求。。为什么

使用我的浏览器的ispect工具,我有以下请求:

Request URL:http://localhost:8080/mywebapp/controller/update/
Request Method:POST
Status Code:200 OK

Form Data: idProvino=5869&oper=edit&id=2
我解决了

我的方法中有
BindingResult
,但我没有绑定任何内容,所以这就是问题所在

因此,如果我这样做,它会起作用:

 @RequestMapping(value = "/update", method = RequestMethod.POST)
        @ResponseBody
        public void update(@RequestParam(value="id", required=true) Long id,
                @RequestParam(value="idProvino", required=true) String idProvino, 
                @RequestParam(value="oper", required=true) String oper,final HttpServletRequest httpServletRequest) {

        DO SOMETHING
    }

在jQgrid中调用“update”调用的ajax.request在哪里?@PawełGłowacz它在jQgrid中使用editurl选项生成到jQgrid中。您是否可以使用IE/Chrome/Firefox的开发人员工具跟踪服务器和客户端之间的HTTP流量。如果您看到真正将发送到服务器的内容,您可以定位问题的根源:客户端或服务器代码。@Oleg I add request to QUEST to QUEST。。但对我来说似乎是正确的…我看到你找到了解决办法。祝贺你!HTTP跟踪帮助您查看应该在哪里搜索问题的根源,以及您自己已经找到了原因。好的