Ext 데이터베이스에서 데이터 생성 목록 읽기

2454 단어 ext

var fabircTypeDs = new Ext.data.Store({
                     proxy: new Ext.data.HttpProxy({
                          url: CONTEXT_PATH+'/fabrictype/fabrictypeAll.action'
                     }),
                     reader: selReader,
                     remoteSort: false
                    });
                fabircTypeDs.load();
                var fabircTypeCmb = new Ext.form.ComboBox({
                    fieldLabel: ' ',
                    store: fabircTypeDs,
                    hiddenName:'softId',
                    loadingText: 'searching...',
                    displayField : 'name',
                    mode:'local',
                    editable : false,
                    valueField: 'id',
                    width: 170,
                    triggerAction: 'all'
                    });
                    //     , , google 
                var dsSupplier = new Ext.data.Store({
                            proxy: new Ext.data.ScriptTagProxy({
                               url:CONTEXT_PATH+'/supplier/supplierAll.action'
                          }),
                              reader: new Ext.data.JsonReader({
                                root: 'gridRows',
                               totalProperty: 'totalCount'
                            }, [
                                  {name: 'id', mapping: 'id'},
                                {name: 'name', mapping: 'name'}
                              ])
                        });
                var supplierCmb = new Ext.form.ComboBox({
                    fieldLabel:' ',
                    store: dsSupplier,
                    displayField:'name',
                    valueField: 'id',
                    typeAhead: true,
                    loadingText: 'loading...',
                    width: 170,
                    hiddenName:'name',
                    hideTrigger:true,
                    minChars:1,
                    forceSelection:true,
                    triggerAction: 'all'
                });

좋은 웹페이지 즐겨찾기