zombeerose
26 Jan 2012, 2:38 PM
REQUIRED INFORMATION
Ext version tested:
Ext 4.1 Beta 1 - Nightly Build 20120125
Browser versions tested against:
Chrome 16
DOCTYPE tested against:
Strict
Description:
A store that has a field named "delete" will cause a hard JS error.
Steps to reproduce the problem:
Run the code.
The result that was expected:
No error.
The result that occurs instead:
Error: SyntaxError: Unexpected token delete
Test Case:
Ext.create('Ext.data.Store', {
storeId:'simpleStore',
fields:[
{name:'id',type:'int'},
'name',
{name:'delete',type:'bool'}
//'create',
//'update'
],
data:{'items':[
{"id":"1","name":"Lisa","delete":"true"},
{"id":"2","name":"Bart","delete":"false"},
{"id":"3","name":"Homer","delete":"false"},
{"id":"4","name":"Marge","delete":"true"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Simple Grid',
store: Ext.data.StoreManager.lookup('simpleStore'),
columns: [
{header: 'Id', dataIndex: 'id', hidden: true },
{header: 'Name', dataIndex: 'name', flex:1}
],
height: 200,
width: 500,
renderTo: Ext.getBody()
});
HELPFUL INFORMATION
Additional CSS used:
only default ext-all.css
Operating System:
WinXP Pro
Ext version tested:
Ext 4.1 Beta 1 - Nightly Build 20120125
Browser versions tested against:
Chrome 16
DOCTYPE tested against:
Strict
Description:
A store that has a field named "delete" will cause a hard JS error.
Steps to reproduce the problem:
Run the code.
The result that was expected:
No error.
The result that occurs instead:
Error: SyntaxError: Unexpected token delete
Test Case:
Ext.create('Ext.data.Store', {
storeId:'simpleStore',
fields:[
{name:'id',type:'int'},
'name',
{name:'delete',type:'bool'}
//'create',
//'update'
],
data:{'items':[
{"id":"1","name":"Lisa","delete":"true"},
{"id":"2","name":"Bart","delete":"false"},
{"id":"3","name":"Homer","delete":"false"},
{"id":"4","name":"Marge","delete":"true"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'Simple Grid',
store: Ext.data.StoreManager.lookup('simpleStore'),
columns: [
{header: 'Id', dataIndex: 'id', hidden: true },
{header: 'Name', dataIndex: 'name', flex:1}
],
height: 200,
width: 500,
renderTo: Ext.getBody()
});
HELPFUL INFORMATION
Additional CSS used:
only default ext-all.css
Operating System:
WinXP Pro