PDA

View Full Version : can I just declare paritil fields for jsonStore?



hchen
23 Jun 2008, 4:41 PM
If there are 10 fields for adminstore, can I use some of them as follows? Thanks!

var adminStore = new Ext.data.JsonStore({
fields:[
{name:'userId'},
{name:'firstName'},
{name:'lastName'},
{name:'emailAddress'},
{name:'phone'}
]
});

evant
23 Jun 2008, 5:59 PM
What do you mean?

Are you saying your JSON data contains 10 items, but the store only needs to access 5?

hchen
23 Jun 2008, 8:01 PM
yes, does it has problem?