title: ExtJS 4.1 condition in tooltip
body: <p>I'm trying to create a condition inside a tooltip template.</p>
  
  <p>I've declared my template like this:</p>
  
  <pre><code>    tooltipTpl: new Ext.XTemplate(
      '&lt;tpl for="."&gt;',
          '&lt;dl class="eventTip"&gt;',
          '&lt;tpl if="values.getLength() == 1"&gt;',
              '&lt;dt class="icon-clock"&gt;Time&lt;/dt&gt;&lt;dd&gt;{[Ext.Date.format(values.start, "d-m")]} - {[Ext.Date.format(Ext.Date.add(values.end,Ext.Date.SECOND,-1), "d-m")]}&lt;/dd&gt;',
          '&lt;/tpl&gt;',
          '&lt;tpl if="values.getLength() &amp;gt; 1"&gt;',
              '&lt;dt class="icon-clock"&gt;Day&lt;/dt&gt;&lt;dd&gt;{[Ext.Date.format(values.start, "d-m")]}&lt;/dd&gt;',
          '&lt;/tpl&gt;',
          '&lt;dt class="icon-task"&gt;Status&lt;/dt&gt;&lt;dd&gt;{Name}&lt;/dd&gt;',
          '&lt;/dl&gt;',
      '&lt;/tpl&gt;'
          ).compile(),
  </code></pre>
  
  <p>The idea behind is to be able to display 2 dates (start and end) if event is longer than 1 day, if it is one day event just display that date.</p>
  
  <p>I've declared my model as so:</p>
  
  <pre><code>Ext.define('Urlopy.Model.Plan', {
          extend : 'Sch.model.Event',
          idProperty : 'id',
          resourceIdField : 'userID',
          startDateField  : 'start',
          endDateField    : 'end',
          fields : [{ name : 'id', type : 'int'}, 
                    { name : 'userID', type : 'string'},
                    { name : 'start', type : 'date',  dateFormat : 'MS'},
                    { name : 'end', type : 'date',    dateFormat : 'MS'},
                    { name : 'Name'}],
          getLength : function() {
              return Sch.util.Date.getDurationInDays(this.get('start'), this.get('end'));
          }
      });
  </code></pre>
  
  <p>The second line of my tooltip is displayed, but line with dates isn't. It looks like I cant call function from my model in my template.</p>
  
  <p>How to fix this? Is it possible?</p>