2012-09-10 27 views
1

我創建使用ExtJS的4可編輯網格(使用ExtJS的4 IM)的組合框,我使用外部Ajax調用來填充它,而不是使用ExtJS的代理時,原因是我使用相同的呼叫來加載其他組合框。所以我想爲什麼不使用相同的功能。下面是商店,型號,下拉和Ajax調用的代碼:類型錯誤:URL是不確定的ExtJS 4填充組合框

var drpdwnitems = ""; 

Ext.define('rStatusRecord', { 
    extend: 'Ext.data.Model', 
    fields: [ 
     { name: 'code', type: 'string' }, 
     { name: 'value', type: 'string' } 
    ] 
}); 

var dsStatus = Ext.create('Ext.data.Store', { model: 'rStatusRecord', data: [] }); 

var timeSelectField_1 = { 
    xtype: 'combobox', 
    typeAhead: true, 
    displayField: 'code', 
    valueField: 'value', 
    store: dsStatus, 
    triggerAction: 'all' 

}; 

此字段中網格面板的爲編輯宗旨列基本使用。 AJAX調用基本上返回一個字符串。

$.ajax({ 
    type: "GET", 
    url: "XHR/Task_TypesCalls.aspx?TL_A=1", 
    error: function() { alert('Error loading document'); }, 
    success: loadAvailableTasksList 
}); 

function loadAvailableTasksList(contents, status) { 
    drpdwnitems = contents.split("!"); 
    if (status != "success") return; 

    var drpdwnitemsind; 

    dsStatus.removeAll(); 
    for (i = 0; i < drpdwnitems.length; i++) { 
     drpdwnitemsind = drpdwnitems[i].split(":"); 
     statusRecord = Ext.create('rStatusRecord', { 
      code: drpdwnitemsind[0], //"", 
      value: drpdwnitemsind[0]//"" 
     }); 

     dsStatus.add(statusRecord); 
     } //end of loop 
} 

現在,當我編輯的字段,打開組合框,有一個錯誤

類型錯誤:URL是不確定的
此錯誤是在文件EXT-ALL-debug.js

什麼我的猜測是商店的url配置是必要的,即時通訊不提供它。或者我在這裏做錯了什麼?

回答