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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi