PDA

View Full Version : Add Spinner to List Item Template



bethnguyen
21 Aug 2012, 2:03 PM
How do you add a Spinner control or other form type component to a List Item Template? I found code on the forum for adding a button to a DataView template but can't seem to get it working for a Spinner in the List Item Template. Here is the example I found:


itemTpl: new Ext.XTemplate(
'<p>{name}',
'<tpl if="age &gt; 17">',
'<button>Vote</button>',
'</tpl>',
'</p>'
)


I tried using <spinner></spinner> in the item template but that doesn't work.... also, if I try to edit the master javascript file (via the Code view), it says read-only and I am not able to try adding the "new Ext.XTemplate code... how/where would I do this?

Thanks -

bethnguyen
22 Aug 2012, 6:23 AM
I just found the useComponents configuration/property for the DataView... but does that allow for adding a component within each item template along with text data or does that require that the item itself has to be a component?

Thanks!