I have been testing extjs4 along with cakephp and am now stuck on putting mutil store records in one single textarea
I have the fallowing in my .js view file
Code:
{
xtype: 'textarea',
name : 'notes', //notes will hold foreign_key number
allowBlank: true,
fieldLabel: 'Notes',
editable: false,
anchor: '100%'
}
This is the .js model file. File I want to call and filter (Notes store)
Code:
Ext.define('Mc.model.Notes',{
extend: 'Ext.data.Model'
,fields: [
{name: 'id', type: 'int'}
,{name: 'foreign_key', type: 'int'}
,{name: 'user_id', type: 'int'}
,{name: 'user_name', type: 'string'}
,{name: 'notes', type: 'string'}
,{name: 'all', convert: function(v, record) {
var note = '- '+record.get('notes');
var username = ' ('+record.get('user_name')+')\r\n';
return note , username;
}}
]
});
the idea is that all records containing the same foreign_key will be shown inside the textarea. fields 'all' to be exact.
Any suggestions please?
Thank you