title: Calling member functions on click/tap within sencha touch 2 templates
body: <p>I am rather new to sencha touch, I've done a lot of research and tutorials to learn the basics but now that I am experimenting I have run into a problem that I can't figure out. </p>
  
  <p>I have a basic DataList which gets its data from a store which displays in a xtemplate. </p>
  
  <p>Within this template I have created a member function which requires store field data to be parsed as a parameter. </p>
  
  <p>I would like to make a thumbnail image (that's source is pulled from the store) execute the member function on click/tap. </p>
  
  <p>I can't find any information on this within the docs, does anyone know the best way to go about this?</p>
  
  <p>Here is a code example (pulled from docs as I can't access my actual code right now). </p>
  
  <pre><code>var tpl = new Ext.XTemplate(
  '&lt;p&gt;Name: {name}&lt;/p&gt;'
  {
      tapFunction: function(name){
         alert(name);
      }
  }
  );
  tpl.overwrite(panel.body, data);
  </code></pre>
  
  <p>I want to make the paragraph clickable which will then execute the tapFunction() member function and pass the {name} variable. </p>
  
  <p>Doing something like onclick="{[this.tapFunction(values.name)]} " does not seem to work. </p>