miroperez
6 Feb 2011, 8:03 AM
I'm trying to have a dataview which allows the user to tap multiple items and have them each be selected but each click causes the previous selection class to be removed.
I did a quick test with the sample code from nestedLoading.js which loads user orders and added the multiSelect: true and simpleSelect: true and I still see the previous selection class get removed from the itemSelector.
{
xtype: 'dataview',
/*
* The XTemplate allows us to easily render the data from our User model, as well as
* iterating over each User's Orders and OrderItems:
*/
tpl: [
'<tpl for=".">',
'<div class="user">',
'<h3>{name}\'s orders:</h3>',
'<tpl for="orders">',
'<div class="order" style="padding-left: 20px;">',
'Order: {id} ({status})',
'<ul>',
'<tpl for="orderItems">',
'<li>{quantity} x {name}</li>',
'</tpl>',
'</ul>',
'</div>',
'</tpl>',
'</div>',
'</tpl>'
],
itemSelector: 'div.user',
styleHtmlContent: true,
multiSelect: true,
singleSelect : false,
simpleSelect: true,
store: new Ext.data.Store({
model: 'User',
autoLoad: true
})
}
Am I missing something or misunderstanding the docs here?
Thanks,
Miro
I did a quick test with the sample code from nestedLoading.js which loads user orders and added the multiSelect: true and simpleSelect: true and I still see the previous selection class get removed from the itemSelector.
{
xtype: 'dataview',
/*
* The XTemplate allows us to easily render the data from our User model, as well as
* iterating over each User's Orders and OrderItems:
*/
tpl: [
'<tpl for=".">',
'<div class="user">',
'<h3>{name}\'s orders:</h3>',
'<tpl for="orders">',
'<div class="order" style="padding-left: 20px;">',
'Order: {id} ({status})',
'<ul>',
'<tpl for="orderItems">',
'<li>{quantity} x {name}</li>',
'</tpl>',
'</ul>',
'</div>',
'</tpl>',
'</div>',
'</tpl>'
],
itemSelector: 'div.user',
styleHtmlContent: true,
multiSelect: true,
singleSelect : false,
simpleSelect: true,
store: new Ext.data.Store({
model: 'User',
autoLoad: true
})
}
Am I missing something or misunderstanding the docs here?
Thanks,
Miro