1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    80
    Vote Rating
    0
    ajmPal is on a distinguished road

      0  

    Default ComboBox Template

    ComboBox Template


    Is there an easy way to create a template for a comboBox based on the data read in the data store ?
    Right now I have something like this:

    Code:
    var resultTpl = new Ext.XTemplate(
    '<tpl for="."><div class="x-combo-list-item">',
    '<span><b>Query Date:</b>{queryDate}, StartDate:{startDate},EndDate:{endDate},
    SearchTerm:<b>{searchTerm}</b><>/span><br/>',
    '</div></tpl>'
    );
    What I would like to do is detect if any of the variables are filled (ie, startDate, endData, searchTerm) and just put the header in the template only if there is data to go with it.
    So my comboBox would look like this:

    Query Date: 04-09-2010, StartDate:03-01-2010, EndDate:04-01-2010,SearchTerm:community
    Query Date: 04-09-2010, StartDate:03-01-2010, EndDate:04-01-2010,SearchTerm:telephone
    Query Date: 04-09-2010, StartDate:03-01-2010, EndDate:04-01-2010
    Query Date: 04-09-2010, SearchTerm:community

  2. #2
    Ext User
    Join Date
    Oct 2008
    Posts
    41
    Vote Rating
    0
    Spring is on a distinguished road

      0  

    Default


    You can use smth like this:



    Code:
    var resultTpl = new Ext.XTemplate(
    '<tpl for="."><div class="x-combo-list-item">',
    '<span>',
    '<tpl if="queryDate != \'\'"><b>Query Date:</b>{queryDate}, </tpl>', 
    'StartDate:{startDate},EndDate:{endDate},
    SearchTerm:<b>{searchTerm}</b></span><br/>',
    '</div></tpl>'
    );

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar