Javascript jqGrid中的内联编辑添加按钮不工作。按add时,它将调用控制器中的edit.do url var参数={ addtext:“添加”, 编辑文本:“编辑”, savetext:“保存”, 取消文本:“取消”, 编辑:对, 编辑图标:“用户界面图标铅笔”, 加:是的, addicon:“用户界面图标+”, 保存:是的, saveicon:“ui图标磁盘”, 取消:对, 取消图标:“ui图标取消”, 编辑参数:{ 网址:“edit.do”, mtype:“POST”, editData:{}, closeAfterEdit:true, reloadAfterSubmit:对, aftersavefunc:函数(rowid,response){ 警报(rowid); 警报(响应); var result=eval('('+response.responseText+'); var误差=”; if(result.success==false){ 对于(变量i=0;i

Javascript jqGrid中的内联编辑添加按钮不工作。按add时,它将调用控制器中的edit.do url var参数={ addtext:“添加”, 编辑文本:“编辑”, savetext:“保存”, 取消文本:“取消”, 编辑:对, 编辑图标:“用户界面图标铅笔”, 加:是的, addicon:“用户界面图标+”, 保存:是的, saveicon:“ui图标磁盘”, 取消:对, 取消图标:“ui图标取消”, 编辑参数:{ 网址:“edit.do”, mtype:“POST”, editData:{}, closeAfterEdit:true, reloadAfterSubmit:对, aftersavefunc:函数(rowid,response){ 警报(rowid); 警报(响应); var result=eval('('+response.responseText+'); var误差=”; if(result.success==false){ 对于(变量i=0;i,javascript,spring-mvc,jqgrid,Javascript,Spring Mvc,Jqgrid,我的控制器代码是: @RequestMapping(value=“/add.do”,method=RequestMethod.POST) public@ResponseBody String add(@RequestParam(“script_name”)String script_name, @RequestParam(“脚本位置”)字符串脚本位置, @RequestParam(“主机url”)字符串主机url, @RequestParam(“协议”)字符串协议, @RequestParam(

我的控制器代码是:

@RequestMapping(value=“/add.do”,method=RequestMethod.POST)
public@ResponseBody String add(@RequestParam(“script_name”)String script_name,
@RequestParam(“脚本位置”)字符串脚本位置,
@RequestParam(“主机url”)字符串主机url,
@RequestParam(“协议”)字符串协议,
@RequestParam(“加速时间”)长加速时间,
@RequestParam(“noof_用户”)长noof_用户,
@RequestParam(“循环”)int循环,@RequestParam(“延迟”)长延迟){
debug(“收到添加新用户的请求”);
字符串s=脚本位置;
int l=循环;
System.out.println(“循环”+s);
int max_srno=userService.getMaxSerielNo();
int new_sr_no=max_srno+1;
Boolean success=userService.add(新的脚本编号、脚本名称、脚本位置、,
主机url、协议、启动时间、无用户、循环、延迟);
System.out.println(“成功”+成功);
Gson myGson=新的Gson();
//检查是否成功
if(success==true){
//成功。返回自定义响应
CustomGenericResponse响应=新建CustomGenericResponse();
response.setSuccess(true);
response.setMessage(“操作成功!”);
//将书籍列表序列化为JSON
返回myGson.toJson(响应);
}否则{
//失败。同时返回自定义响应
CustomGenericResponse响应=新建CustomGenericResponse();
response.setSuccess(false);
response.setMessage(“操作失败!”);
返回myGson.toJson(响应);
}
}
@RequestMapping(value=“/edit.do”,method=RequestMethod.POST)
公共@ResponseBody
字符串编辑(
@RequestParam(“脚本名称”)字符串脚本名称,
@RequestParam(“脚本位置”)字符串脚本位置,
@RequestParam(“主机url”)字符串主机url,
@RequestParam(“协议”)字符串协议,
@RequestParam(“加速时间”)长加速时间,
@RequestParam(“noof_用户”)长noof_用户,
@RequestParam(“循环”)int循环,
@RequestParam(“延迟”)长延迟,@RequestParam(“id”)字符串id){
int seriel_number=Integer.parseInt(id);
System.out.println(“id-----------------”+序列号);
debug(“收到更新新用户的请求”);
Boolean success=userService.edit(脚本名称、脚本位置、主机url、,
协议、爬升时间、noof用户、循环、延迟、序列号);
Gson myGson=新的Gson();
if(success==true){
//成功。返回自定义响应
CustomGenericResponse响应=新建CustomGenericResponse();
response.setSuccess(true);
response.setMessage(“操作成功!”);
返回myGson.toJson(响应);
}否则{
//失败。同时返回自定义响应
CustomGenericResponse响应=新建CustomGenericResponse();
response.setSuccess(false);
response.setMessage(“操作失败!”);
返回myGson.toJson(响应);
}
}

你说得对。jqGrid在InlineAV的
inlineAV
中有一些bug。上次我发布了以下错误报告:、和。相应的更改已在上的主代码中完成。请参阅提交:、和。例如,您可以从
jquery.jqGrid.src.js
的副本中获取固定代码或进行相应的更改