eDissideNT
4 Sep 2010, 12:25 PM
If I add text field (input or textarea) to any item of Ext.List, I can't edit or select text in this field.
tpl: '<tpl for="."><input type="text" name="text"></tpl>'
Thanks.
taka_2
6 Sep 2010, 11:59 PM
The following code works well.
Can you accomplish your goals?
Ext.setup({
onReady : function() {
Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});
var groupingBase = {
fullscreen: true,
tpl: '<tpl for="."><input type="text" name="text"><br></tpl>',
itemSelector: 'div.contact',
singleSelect: true,
store: new Ext.data.Store({
model: 'Contact',
sorters: 'firstName',
data: [
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Ed', lastName: 'Spencer'}
]
}),
listeners: {
itemtap: function(dataView, index, item, e) {
alert(dataView.getSelectedRecords()[0].get('firstName'));
}
}
};
new Ext.List(groupingBase);
}
});
http://jsdo.it/taka_2/5c5U
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.