Dumas
13 Jun 2010, 7:43 AM
Hi!
I've found an error with the DataViewTransition.
Ext version tested:
Ext 3.2.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
FF3 (firebug 1.5.3 installed)
Operating System:
Win7 Pro
Description:
When the DataViewTransition plugin is used dataview.getRecord(node) returns a false value after a filter is put on the store.
Without the plugin everything works.
(sry for bad sound)
Test Case:
var store = new Ext.data.SimpleStore({
data:[
[ 1, 'one'],
[ 2, 'two'],
[ 3, 'three'],
[ 4, 'four'],
[ 5, 'five']
],
id: 0, // first field is the id-field
fields: ['id','display']
});
var dataview = new Ext.DataView({
store: store,
tpl : new Ext.XTemplate(
'<ul>',
'<tpl for=".">',
'<li class="element" style="width:100px; height:14px;">{display}</li>',
'</tpl>',
'</ul>'
),
id: 'elements',
plugins : [
new Ext.ux.DataViewTransition({
duration : 550,
idProperty: 'id'
})
],
itemSelector: 'li.element',
singleSelect: true,
listeners: {
dblclick: function(dataview, index, node, event) {
console.info(dataview.getRecord(node).data.id);
}
}
});
var panel = new Ext.Panel({
title: 'getRecord works',
renderTo: document.body,
height:120,
items: dataview
});
// this cretaes the error
// should be called after render
store.filter([{
fn: function(record) {
return record.get('id') > 3;
}
}]);
Steps to reproduce the problem:
open a site with ExtJS and DataViewTransition loaded, e.g. http://www.extjs.com/deploy/dev/examples/view/multisort-dataview.html
execute the code example from above without the store.filter at the end
DblClick on elements to see that each element returns the right value in firebug
Call a filter on the store like last part in the example code
DblClick on elements again to see that something is wrong now
Try the whole thing without DataViewtransition to see that the error occures because of the plugin
The result that was expected:
the to the node corresponding record
The result that occurs instead:
wrong record or undefined
Screenshot or Video:
http://screencast.com/t/Y2I1MjU0 (http://screencast.com/t/Y2I1MjU0) (sry for bad sound)
Debugging already done:
none inside the plugin
Possible fix:
not provided
regards
Roland
I've found an error with the DataViewTransition.
Ext version tested:
Ext 3.2.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
FF3 (firebug 1.5.3 installed)
Operating System:
Win7 Pro
Description:
When the DataViewTransition plugin is used dataview.getRecord(node) returns a false value after a filter is put on the store.
Without the plugin everything works.
(sry for bad sound)
Test Case:
var store = new Ext.data.SimpleStore({
data:[
[ 1, 'one'],
[ 2, 'two'],
[ 3, 'three'],
[ 4, 'four'],
[ 5, 'five']
],
id: 0, // first field is the id-field
fields: ['id','display']
});
var dataview = new Ext.DataView({
store: store,
tpl : new Ext.XTemplate(
'<ul>',
'<tpl for=".">',
'<li class="element" style="width:100px; height:14px;">{display}</li>',
'</tpl>',
'</ul>'
),
id: 'elements',
plugins : [
new Ext.ux.DataViewTransition({
duration : 550,
idProperty: 'id'
})
],
itemSelector: 'li.element',
singleSelect: true,
listeners: {
dblclick: function(dataview, index, node, event) {
console.info(dataview.getRecord(node).data.id);
}
}
});
var panel = new Ext.Panel({
title: 'getRecord works',
renderTo: document.body,
height:120,
items: dataview
});
// this cretaes the error
// should be called after render
store.filter([{
fn: function(record) {
return record.get('id') > 3;
}
}]);
Steps to reproduce the problem:
open a site with ExtJS and DataViewTransition loaded, e.g. http://www.extjs.com/deploy/dev/examples/view/multisort-dataview.html
execute the code example from above without the store.filter at the end
DblClick on elements to see that each element returns the right value in firebug
Call a filter on the store like last part in the example code
DblClick on elements again to see that something is wrong now
Try the whole thing without DataViewtransition to see that the error occures because of the plugin
The result that was expected:
the to the node corresponding record
The result that occurs instead:
wrong record or undefined
Screenshot or Video:
http://screencast.com/t/Y2I1MjU0 (http://screencast.com/t/Y2I1MjU0) (sry for bad sound)
Debugging already done:
none inside the plugin
Possible fix:
not provided
regards
Roland