dimanche 22 juin 2014

How to use tpl with displafield in Ext JS 4.2

Hi,

I want to use a displayfield to show attachments as links via tpl setting, but don't know how.



This is the fields section of my model, the 'attachments' field would be an array:



Code:



fields: [
...
{ name: 'attachments', type: 'auto' }
]

and this is the displayfield configration I've been using to test tpl, but I get nothing displayed:



Code:



{
name: 'attachments',
fieldLabel: 'Attachments',
tpl: new Ext.XTemplate(
'<tpl foreach=".">',
'<p>id: {id}</p>',
'</tpl>'
)
}



and this is one of the 'attachments' field data
Untitled.png

Thanks for your help, any suggestion will be welcome and appreciated.





Aucun commentaire:

Enregistrer un commentaire