extjs三种传值方式

extjs三种传值方式:

1,params传值
Ext.Ajax.request({
   url : ‘referfriend/getReferfriends‘,
   method : ‘GET‘,
   params : {
    customerId: rec.data[‘id‘]
   },
   success : function(response, opts) {
    var data = Ext.JSON.decode(response.responseText);
    this.getIntroducerList().store.loadData(this.convertModel(data.introducers));
    this.getIntroducedList().store.loadData(this.convertModel(data.introduceds));
   },
   failure : function(response, opts) {
    Ext.MessageBox.show({
     title : ‘获取亲传关系失败‘,
     msg : response.error.message,
     icon : Ext.Msg.ERROR,
     buttons : Ext.Msg.OK
    });
   },
   scope : this
  });

controller用此种方式接值
@RequestMapping(value = "/getReferfriends", method = RequestMethod.GET)
 @ResponseBody
 public ReferfriendVo getReferfriends(
   @RequestParam(value = "customerId") java.lang.Long customerId,
   @ActiveUser User activeUser) {}

2,

if (record.length == 1) {
//      Ext.Ajax.request({
//       url : ‘referfriend/adjustReferfriend‘,
//       method : ‘DELETE‘,
//       jsonData : newReferfriend,//后台用@RequestBody Referfriend updateReferfriend,
//       success : function(response, opts) {
//        me.executeloadData(me.customer);
//        Ext.MessageBox.show({
//         title : ‘提示‘,
//         msg : ‘调整成功!‘,
//         icon : Ext.Msg.INFO,
//         buttons : Ext.Msg.OK
//        });
//        window.hide();
//       },
//       failure : function(response, opts) {
//        Ext.MessageBox.show({
//            title: ‘获取介绍人奖励配置‘,
//            msg: response.error.message,
//            icon: Ext.Msg.ERROR,
//            buttons: Ext.Msg.OK
//           });
//       },
//       scope : this
//      });


3, url : ‘referfriend/‘ + record[0].get(‘id‘)+ ‘/referfriendReview‘,后台用@PathVariable("id") Referfriend referfriend

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。