This example shows how to use Ext.Template and Ext.XTemplate.
Note that the js is not minified so it is readable. See templates.js.
Apply the template to see results here