PDA

View Full Version : itemselector problem



nels2k
24 Sep 2009, 12:17 PM
im trying to create an itemselector which loads some data from a JsonStore in one section and then the user can drag items to another section. the problem im having is that when items are dragged to the next section they appear blank and have no value. but if the item is dragged back it will a value, only in its original section.

my itemselctor looks like:

{
xtype: 'itemselector',
name: 'itemselector',
hideLabel:true,
drawUpIcon:false,
drawDownIcon:false,
drawTopIcon:false,
drawBotIcon:false,
imagePath: '../examples/ux/images/',
multiselects: [{
legend: 'Allowed Columns',
width: 250,
height: 200,
store: allowedStore,
displayField: 'ac',
valueField: 'ac'
},{
legend: 'Choosen Columns',
width: 250,
height: 200,
store: ['blank'],
tbar:[{
text: 'clear',
handler:function(){
simple.getForm().findField('itemselector').reset();
}
}]
}]
}

and my store is:

var allowedStore = new Ext.data.JsonStore({
// store configs
autoDestroy: true,
autoLoad: true,
storeId: 'allowedStore',
url: 'report.json', // automatically configures a HttpProxy
// reader configs
root: 'allowedColumns',
fields: ['ac']
});