您的位置:首页 > 其它

Ext.grid.EditorGridPanel保存

2013-08-19 09:53 183 查看
用get方法传递编辑的数据会出现乱码,解决get乱码的方法就是encodeURI(param),然后在后台转码:

String strJson = new String(request.getParameter("param").getBytes("iso-8859-1"),"utf-8");
java.net.URLDecoder.decode(strJson, "UTF-8");

下面是get方法传参代码:

1、获取Ext.grid.EditorGridPanel的bbar添加保存按钮

String strJson = request.getParameter("UpdateInfo");
System.out.println(strJson);
JSONArray js=JSONArray.fromObject(strJson);
JSONObject json = null;
Iterator it=js.iterator();
while(it.hasNext()){
json=(JSONObject)it.next();
String nbbm=json.getString("nbbm");
int flag = json.getInt("flag");
}


post/servlet
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: