1. #1
    Sencha User JamieMason's Avatar
    Join Date
    Apr 2010
    Location
    Leeds, UK
    Posts
    42
    Vote Rating
    0
    JamieMason is on a distinguished road

      0  

    Default Answered: Can you use || in Ext.XTemplate <tpl if="">

    Answered: Can you use || in Ext.XTemplate <tpl if="">


    Ultra quick question, there's no mention of || in the docs at http://docs.sencha.com/ext-js/4-0/#!/api/Ext.XTemplate, can you use || as well?

    Code:
    <tpl if="age > 1 && age < 10">Child</tpl><tpl if="age >= 10 && age < 18">Teenager</tpl>
    <tpl if="this.isGirl(name)">...</tpl>
    <tpl if="id==\'download\'">...</tpl>
    <tpl if="needsIcon"><img src="{icon}" class="{iconCls}"/></tpl>
    // no good:
    <tpl if="name == "Tommy"">Hello</tpl>
    // encode " if it is part of the condition, e.g.
    <tpl if="name == &quot;Tommy&quot;">Hello</tpl>

  2. From a quick test in Firebug it would appear you can:

    Code:
    new Ext.XTemplate('<tpl if="age === 6 || age === 5">Yes</tpl>').apply({age: 5});

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,585
    Answers
    540
    Vote Rating
    319
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    From a quick test in Firebug it would appear you can:

    Code:
    new Ext.XTemplate('<tpl if="age === 6 || age === 5">Yes</tpl>').apply({age: 5});

  4. #3
    Sencha User JamieMason's Avatar
    Join Date
    Apr 2010
    Location
    Leeds, UK
    Posts
    42
    Vote Rating
    0
    JamieMason is on a distinguished road

      0  

    Default


    Thanks!

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