Basicly what i want to achiev
I have json that look like:
info {
array
}
comments {
array
}
success: true
First i want to use DataView that use data stored in info
PHP Code:
var tempTicket = new Ext.data.JsonStore({
url: '/tickets/card/id/'+sel.get('ticket_id'),
root: 'info',
fields: [
'ticket_id',
'subject',
'created_date',
'assignedto_usr_name',
'status',
'content'
]
});
tempTicket.load();
That how JsonStore looks like.
But i would like to use data stored in comments and display them as a grid.
If i add second store with diferent root i have 2 requests to server.
Is there anyway to define rot folder after data is loaded? Something like:
PHP Code:
var tempTicket = new Ext.data.JsonStore({
url: '/tickets/card/id/'+sel.get('ticket_id')
});
tempTicket.load();
PHP Code:
new Ext.DataView({
store: tempTicket({root: info}),
tpl: ticket_preview_tpl,
emptyText: 'No records'
})