Ext doAction提交json参数后台接收为乱码解决方案

在websphere服务器上,客户端提交json代码,后台接收为中文字母为乱码,为这个问题没少查阅资料,在参考对比Ext.Ajax.request方法时,豁然发现传递json参数方式有问题,细微差别,导出出现不同的问题,详细代码如下:

loginForm.form.doAction('submit',{
                                           url:'purchaseApplyToOrder.do',
                                            method:'post',
                                        //    params:'json='+json,  //错误提交json参数,导致后台接收中文字母为乱码
                                            params:{json:json},   //正确提交json参数
                                            timeout: 999999999999999999,
                                            waitMsg:'正在提交......',
                                            waitTitle :'等待',
                                            success:function(form,actionReturned){
             Ext.MessageBox.alert('信息提示',"成功,申请编号:"+actionReturned.result.successful,function(){
                                                parent.parent.search();
                                                         parent.parent.win.close();
                 
                                                     });
             this.disabled=true;
                             },
                                      failure:function(form, actionReturned){
                                        if(actionReturned.result!=null){
              Ext.MessageBox.alert('信息提示',actionReturned.result.error,function(){
                                                parent.parent.search();
                                                         parent.parent.win.close();
                 
                                                     });
                                              }else{ 
                                            Ext.MessageBox.alert('信息提示','请求超时,请刷新!',function(){
                                                parent.parent.search();
                                                         parent.parent.win.close();
                 
                                                     });
                                               this.disabled=false;
                                               
                                            }
                                          }
                         })

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值