blessan
14 Sep 2010, 1:57 AM
I have a list. When I try to set a value to a item in the store the design break.
Here is my code
Ext.regModel('bookPanelModel', {
fields: [
{name: 'value', type: 'string'},
{name: 'title', type: 'string'},
{name: 'cls', type: 'string'}
]
});
bookPanelStore = new Ext.data.JsonStore({
data : [
{title:"Client", cls:"formAll"},
{title:"Service", cls:"formTop"},
{title:"Length", cls:"formBottom"},
{title:"Start Time", cls:"formAll"},
{title:"Frequency", cls:"formTop"},
{title:"Start Date", cls:"formMiddle"},
{title:"End Date", cls:"formBottom"}
],
model : 'bookPanelModel',
autoLoad : true
});
bookList = new Ext.List ({
fullscreen:true,
id:'tester',
cls:'sellPanelList',
itemSelector: 'div.sellOpt',
singleSelect: true,
scroll:'vertical',
store:bookPanelStore,
tpl: '<tpl for="."><div class="sellOpt">'+
'<div class="formItem {cls}">'+
'<div class="title" style="width:90%;color:gray;">{title}</div>'+
'<div class="value next" style="width:10%;">{value}</div>'+
'</div></tpl>',
});
Now when I try this command in the console
Ext.getCmp('tester').store.getAt(3).set('value','sdf');
The items below this particular item disappear. I wondering if this is a bug as it works in 0.93
Anyone one know how to fix this?
Here is my code
Ext.regModel('bookPanelModel', {
fields: [
{name: 'value', type: 'string'},
{name: 'title', type: 'string'},
{name: 'cls', type: 'string'}
]
});
bookPanelStore = new Ext.data.JsonStore({
data : [
{title:"Client", cls:"formAll"},
{title:"Service", cls:"formTop"},
{title:"Length", cls:"formBottom"},
{title:"Start Time", cls:"formAll"},
{title:"Frequency", cls:"formTop"},
{title:"Start Date", cls:"formMiddle"},
{title:"End Date", cls:"formBottom"}
],
model : 'bookPanelModel',
autoLoad : true
});
bookList = new Ext.List ({
fullscreen:true,
id:'tester',
cls:'sellPanelList',
itemSelector: 'div.sellOpt',
singleSelect: true,
scroll:'vertical',
store:bookPanelStore,
tpl: '<tpl for="."><div class="sellOpt">'+
'<div class="formItem {cls}">'+
'<div class="title" style="width:90%;color:gray;">{title}</div>'+
'<div class="value next" style="width:10%;">{value}</div>'+
'</div></tpl>',
});
Now when I try this command in the console
Ext.getCmp('tester').store.getAt(3).set('value','sdf');
The items below this particular item disappear. I wondering if this is a bug as it works in 0.93
Anyone one know how to fix this?