当前位置: 代码迷 >> Web前端 >> Ext后台老板返回到前台 进行验证 再赋给某一列值
  详细解决方案

Ext后台老板返回到前台 进行验证 再赋给某一列值

热度:90   发布时间:2012-08-27 21:21:57.0
Ext后台返回到前台 进行验证 再赋给某一列值

action

。。。。。

??? this.getResponse().setCharacterEncoding("UTF-8");
??? ??? ??? ??? ??? this.getResponse().getWriter().write(“String”);
??? ??? ??? ??? ??? this.getResponse().getWriter().flush();

?

js

??? var recordDef = Ext.data.Record.create([
??? /*{
??? ??? name : 'merchantname',
??? ??? mapping : 'merchantname',
??? ??? type : 'string'
??? },??? ??? ?????? */????????????????????????????????
??? {
??? ??? name : 'accountMoney',
??? ??? mapping : 'accountMoney',
??? ??? type : 'string'
??? } ]);

?

?

?

?

Ext.Ajax.request({??? ??? ??? ??? ??? ??? ??? ??? ???
??? ??? ??? url : 'accountBalance__getAccountMoney.action',
??? ??? ??? params : {
??? ??? ??? ??? merchantId : searchmerchantid.getValue()
??? ??? ??? },
??? ??? ??? success : function(response) {
??? ??? ??? ??? if(response.responseText == 'error'){
??? ??? ??? ??? ??? Ext.Msg.alert('失败');
??? ??? ??? ??? }else{
??? ??? ??? ??? ??? ds.removeAll();
??? ??? ??? ??? ??? ds.addSorted([
??? ??? ??? ??? ??? ?? new recordDef({
??? ??? ??? ??? ??? ??? ?? accountMoney:response.responseText})
??? ??? ??? ??? ??? ?? ]);
??? ??? ??? ??? };
??? ??? ??? },
??? ??? ??? failure : function() {
??? ??? ??? ??? Ext.Msg.show({
??? ??? ??? ??? ??? ??? ??? title : '错误提示',
??? ??? ??? ??? ??? ??? ??? msg : '发生错误!',
??? ??? ??? ??? ??? ??? ??? buttons : Ext.Msg.OK,
??? ??? ??? ??? ??? ??? ??? icon : Ext.Msg.ERROR
??? ??? ??? ??? ??? ??? });
??? ??? ??? }
??? ??? });

  相关解决方案