reddy479
5 Nov 2012, 11:35 PM
MODEL :
Ext.define('mailtrack.model.TemplateContent', {
extend: 'Ext.data.Model',
fields: [
{name:'id',type:'long'},
{name:'content',type:'string'},
{name:'createdBy',type:'string'},
{name:'updatedBy',type:'string'},
{name:'createdOn',type:'date'},
{name:'updatedOn',type:'date'},
{name:'blockcontentId',type:'long'}
]
});
STORE :
Ext.define('mailtrack.store.TemplateContents', {
extend: 'Ext.data.Store',
model: 'mailtrack.model.TemplateContent',
autoLoad: true,
storeId: 'TemplateContentStoreId',
proxy:{
type: 'ajax',
url:serviceUrl+'template-service/get-template-content/1',
reader: {
type: 'json',
root: 'Block'
},
afterRequest:function( request, success )
{
console.log( 'request here' + request );
console.log( 'success result here' + success );
}
}
});
MY JSON OBJECT data::{"Block":[{"blockcontentId":0,"content":"swapna11155555555555","createdOn":"2010-10-10T00:00:00+05:30","id":6,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"padma22222","createdOn":"2010-10-10T00:00:00+05:30","id":4,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"swapna111","createdOn":"2010-10-10T00:00:00+05:30","id":5,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"Xpressdocs","createdBy":"maanasa","createdOn":"2010-10-10T00:00:00+05:30","id":1,"updatedBy":"malavika","updatedOn":"2010-10-10T00:00:00+05:30"}]}
i want to retrieve content of record in store.
Could u please help me in this.
findRecord on store is not working for me to select record in store.
Thanks in advance.
Ext.define('mailtrack.model.TemplateContent', {
extend: 'Ext.data.Model',
fields: [
{name:'id',type:'long'},
{name:'content',type:'string'},
{name:'createdBy',type:'string'},
{name:'updatedBy',type:'string'},
{name:'createdOn',type:'date'},
{name:'updatedOn',type:'date'},
{name:'blockcontentId',type:'long'}
]
});
STORE :
Ext.define('mailtrack.store.TemplateContents', {
extend: 'Ext.data.Store',
model: 'mailtrack.model.TemplateContent',
autoLoad: true,
storeId: 'TemplateContentStoreId',
proxy:{
type: 'ajax',
url:serviceUrl+'template-service/get-template-content/1',
reader: {
type: 'json',
root: 'Block'
},
afterRequest:function( request, success )
{
console.log( 'request here' + request );
console.log( 'success result here' + success );
}
}
});
MY JSON OBJECT data::{"Block":[{"blockcontentId":0,"content":"swapna11155555555555","createdOn":"2010-10-10T00:00:00+05:30","id":6,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"padma22222","createdOn":"2010-10-10T00:00:00+05:30","id":4,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"swapna111","createdOn":"2010-10-10T00:00:00+05:30","id":5,"updatedOn":"2010-10-10T00:00:00+05:30"},{"blockcontentId":0,"content":"Xpressdocs","createdBy":"maanasa","createdOn":"2010-10-10T00:00:00+05:30","id":1,"updatedBy":"malavika","updatedOn":"2010-10-10T00:00:00+05:30"}]}
i want to retrieve content of record in store.
Could u please help me in this.
findRecord on store is not working for me to select record in store.
Thanks in advance.