- /**
- * @class Ext.app.AdSiteGrid
- * @extends Ext.grid.GridPanel
- * 內容項Add
- */
- Ext.define('ctiWsSort', {
- extend: 'Ext.data.Model',
- fields: [
- { type: 'string', name: 'Id' },
- { type: 'string', name: 'Name' }
- ]
- });
- wsStore = Ext.create('Ext.data.Store', {
- model: 'ctiWsSort',
- proxy:
- {
- type: 'ajax',
- url: 'Data/WebServiceComboxData.json',
- reader: { type: 'json', root: 'data' },
- fields: ['Id', 'Name']
- },
- listeners:
- {
- 'load': function (me, record, successful) {
- if (successful) {
- var combSort = Ext.getCmp('ctcEditTableName');
- combSort.setValue(combSort.getValue());
- }
- }
- },
- autoLoad: true
- });
- {
- xtype: 'combo',
- fieldLabel: 'Web Service接口',
- allowBlank: false,
- blankText: "此項不能爲空",
- id: 'ctiEidtWebServie',
- name: 'wsName',
- typeAhead: true,
- displayField: "text",
- valueField: "value",
- queryMode: 'local',
- store: new Ext.data.SimpleStore({
- fields: ["text", "value"],
- data: [["熱點新聞接口", "1"], ["產品庫存接口", "2"], ["新聞維護接口", "3"]]
- }),
- listeners: {
- "select": function (combo, record, index) {
- alert(combo.value);
- wsStore.proxy.url = 'Data/WebServiceComboxData2.json';
- wsStore.load();
- }
- }
- },
- {
- xtype: 'combo',
- fieldLabel: "數據庫表名",
- blankText: "此項不能爲空",
- allowBlank: false,
- id: "ctcEditTableName",
- name: "TableName",
- displayField: "Name",
- valueField: "Id",
- queryMode: 'local',
- typeAhead: true,
- store: wsStore
- }
ExtJs4.0 下拉框聯動
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.