dave0224
2 May 2007, 8:55 PM
hello
this is myCombo.js
Ext.data.CountryStore = function(config){
Ext.data.CountryStore.superclass.constructor.call(this, {
reader: new Ext.data.JsonReader(
{
root: 'result',
totalProperty: 'totalCount',
id: 'ID'
},
[
{name: 'ID', mapping: 'ID'},
{name: 'COUNTRY_CODE', mapping: 'COUNTRY_CODE'},
{name: 'COUNTRY_NAME_E', mapping: 'NAME_E'},
{name: 'COUNTRY_NAME_C', mapping: 'NAME_C'}
]
),
proxy : new Ext.data.ScriptTagProxy({url: 'geographicalCombo.action?method=getCountries'})
});
//this.load();
};
Ext.extend(Ext.data.CountryStore , Ext.data.Store);
and i inculde my js and uset the obj
var country_store = new Ext.data.CountryStore({});
country_store.load();
and the store data is empty,but i put all in a file ,it is work
can anyone can tell me how to change my code.
this is myCombo.js
Ext.data.CountryStore = function(config){
Ext.data.CountryStore.superclass.constructor.call(this, {
reader: new Ext.data.JsonReader(
{
root: 'result',
totalProperty: 'totalCount',
id: 'ID'
},
[
{name: 'ID', mapping: 'ID'},
{name: 'COUNTRY_CODE', mapping: 'COUNTRY_CODE'},
{name: 'COUNTRY_NAME_E', mapping: 'NAME_E'},
{name: 'COUNTRY_NAME_C', mapping: 'NAME_C'}
]
),
proxy : new Ext.data.ScriptTagProxy({url: 'geographicalCombo.action?method=getCountries'})
});
//this.load();
};
Ext.extend(Ext.data.CountryStore , Ext.data.Store);
and i inculde my js and uset the obj
var country_store = new Ext.data.CountryStore({});
country_store.load();
and the store data is empty,but i put all in a file ,it is work
can anyone can tell me how to change my code.