1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    35
    Vote Rating
    0
    manish khamar is on a distinguished road

      0  

    Default Unanswered: problem with list display using json

    Unanswered: problem with list display using json


    hi

    I have one complex problem.

    I parse json using ajax request and get response properly.
    then show it in list as below:

    code:
    -------------------------------------------------------------------------------------------
    Ext.Ajax.request({
    url:'trial.json',
    method: 'post',
    success: function(response){
    recdata = Ext.decode(response.responseText);
    Ext.regModel('User', { fields: ['address']
    });
    var c = new Ext.data.Store({
    model: 'User',
    autoLoad: true,
    data: [recdata],
    });
    var myTpl = new Ext.XTemplate(
    '<tpl for="."><div class="user"><div>{address}</div><div class="pic"><img src="{[values.picture[0].url]}" ></div></div></tpl>'
    );

    var list = new Ext.List({ fullscreen: true,
    itemTpl :myTpl,
    store : c
    });
    -------------------------------------------------------------------------------------------------
    I can list all data properly from json means address and image both.

    But now problem is that in my json some url tag do not consist any image string so i can not display that image.So I want to display some defualt image there.But i have no idea how i can do that.
    so pls help me to solv it.

  2. #2
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    506
    Answers
    26
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    Please use CODE tags when posting.

    Please do not double-post.

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