+ -
当前位置:首页 → 问答吧 → Ext.ux.RadioGroup 获取JSON数据显示的问题

Ext.ux.RadioGroup 获取JSON数据显示的问题

时间:2011-09-15

来源:互联网

我定义了一个数据源,返回的是json数据
var radStore1 = new Ext.data.JsonStore({
root:'results',
fields:['seneceid','senecefact1'],
method:'post',
url:'${ctx}/discretion/discretiontempale!querySencefact1.action?sid='+sid+'&caseid='+caseid,method:'post', 
autoLoad:true
 }); 

/// 下面的是我写的RadioGroup代码
xtype: 'fieldset',
id : 'smpradio1',
title: '<span class="fs_flag">*</span>&nbsp;情节一',
autoHeight: true,
hideLables: true,
items:[{
  xtype: 'ux-radiogroup',
  name : 'senecefact1', //名称
  horizontal: true, //值为true则表示Radio选项水平排列,false则表示垂直排列,默认值为false
   
  // 下面的代码是我乱写的, 没保存,显示‘senecefact1’,我就是不知道这里怎么显示我后台获取的JSON数据
  store: radStore1,
  radios: [{
  value: 'seneceid',
  boxLabel: 'senecefact1'
  }]  
}]


  求Ext 达人解答我的难题,谢谢!

作者: ghb5371548   发布时间: 2011-09-15

你在raioGroup的items里加store干嘛 其又不起作用 
如果你非要获取store 也得radStore1.load()一下
如果radio内容需要后台交互的话 那么得发起ajax请求 在回调函数中动态的用js往smpradio1的items中加

作者: fanchuanzhidu   发布时间: 2011-09-15