0

我的模型配置:{ 字段:[ { name: 'AcctManagFirst', type: 'string' }, { name: 'AcctManagLast', type: 'string' }, { name: 'Name', type: 'string' }, { name: 'Terms', type: 'string' }, { name: 'Freight', type: 'string' }, { name: 'Taxable', type: 'string' }, { name: 'Taxtable', type :'字符串'},{名称:'TaxTableRate',类型:'字符串'},{名称:'BillToAddr',类型:'字符串'},{名称:'BCity',类型:'字符串'},{名称:'BState',类型:'string'},{名称:'BZip',类型:'string'},{名称:'WHAddr',类型:'字符串' },{名称:'WHCity',类型:'字符串'},{名称:'WHState',类型:'字符串'},{名称:'WHZip',类型:'字符串'},

和我的商店

config:{
    model: 'Sample.model.User',


    proxy:
        {
        type: 'jsonp',
        url: 'http://xxx.xxx.com/customer_info.php',
         buildUrl : function (request) {
         var url = this.getUrl(request),
         params = request.getParams() || {};

         url = url + params.CustNo;
         request.setUrl(url);
          return this.callParent([request]);
          },

       reader: {
            type: 'json',
            rootProperty: 'content'
            }
        }

  I will get the user data from the store... how to write a view that display data with respect to the user.. user data changes .. now I can write the static data but I need the data to be dynamic..           
4

1 回答 1

0

首先,您的问题非常模糊且难以回答。我认为您要完成的是从您的商店动态填充一个列表,点击该列表时将显示详细视图。

您需要组合一个列表视图来显示您的数据以及一个用于详细视图的容器。

您还需要一个引用两个视图的控制器和一个对列表视图的 itemtap 事件的控件。从该控件调用的方法应该将数据设置到您的详细视图中,然后将该视图推送到视口上。

我可以更具体一点,但正如我提到的,这个问题太模糊了,无法为您提供任何类型的示例。将一组硬编码的数据添加到您的商店将有所帮助,以及您的视图、商店、控制器和模型的完整类示例。

于 2013-07-01T15:28:57.070 回答