title: How to pass a return value from a function in xTemplate?
body: <p>Assuming we have the data below:</p>
  
  <pre><code>data: [{
      'D': 1
  }];
  </code></pre>
  
  <p>Generally, we could access this data using the code below:</p>
  
  <pre><code>var tpl = new Ext.XTemplate(
      '&lt;tpl for="."&gt;',      
          '&lt;p&gt;{D}&lt;/p&gt;',  //returns 1
      '&lt;/tpl&gt;'
  );
  </code></pre>
  
  <p>But, if I pass this to a <code>function</code>, it seems that it's just returning a string instead the value of '1'.</p>
  
  <p><strong>Here is a sample code:</strong></p>
  
  <pre><code>var tpl = new Ext.XTemplate(
      '&lt;tpl for="."&gt;',
      '&lt;p&gt;{[this.getLetterD()]}&lt;/p&gt;', //returns 'D'
      '&lt;/tpl&gt;', {
          getLetterD: function () {
              ret = 'D'
              return ret;
          }
      }
  );
  </code></pre>
  
  <p>I am trying to create a <code>function</code> that will get data from another <code>store</code>, store it to a <code>function</code> and render the value of the <code>function</code>. Please advise on how should this be passed in a <code>xTemplate</code>?</p>