1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    arash2001h is on a distinguished road

      0  

    Default List shows only last item retrieved from API

    I want to show the data from the following API in List :

    http://customer.appxtream.com/astro....st&p2=EURO2012

    when I get the data, the Network of Chrome shows me that all elements have been retrieved but List shows only the data from the last item in the API here is my code:

    --------------------------------------------------------------
    VIEW :

    Ext.define('astro.view.HighliteNews', {
    extend: 'Ext.DataView',
    xtype: 'highliteNews',
    config:{


    title:'xren',
    store: 'highliteNewsStoreId',
    itemtap: true,
    scrollable:'horizontal',
    inline:{
    wrap:false
    },


    itemTpl:[
    '<div><img src="{imageLink}"/> </div>',
    ],
    },
    });
    //-----------------------------------------------------------------------------------
    STORE :

    Ext.define('astro.store.HighliteNewsStore',{
    extend: 'Ext.data.Store',


    xtype:'highliteNewsStore',


    config:{
    model: 'astro.model.HighliteNewsModel',
    autoLoad: true,
    storeId: 'highliteNewsStoreId',


    proxy:{
    type:'ajax',


    url :'http://customer.appxtream.com/astro.apps.cms/jsonFeed.action',


    extraParams:{
    service:'astroSportsDataService',
    action:'grabJsonText',
    p1:'HighlightNewsList',
    p2:'EURO2012',
    mimeType:'application/json'


    },


    reader:{
    type:'json',
    rootProperty:'cmsHighlightNewsList',
    },


    },
    }
    });
    -----------------------------------------------------------------------------
    MODEL:

    Ext.define('astro.model.HighliteNewsModel',{
    extend: 'Ext.data.Model',


    config:{
    fields: ['imageLink'],


    }
    });
    -------------------------------------------------
    So the network shows that 3 images are sent from API but the List shows ONLY LAST IMAGE Plz helpppppppppppppppppppppppppppppp

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,546
    Vote Rating
    1119
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    What does the response look like?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    0
    arash2001h is on a distinguished road

      0  

    Default only last items can be retrieved

    Well , I should see 3 images in my screen, but I see only ONE image(which is last image in the API), I mean field that I wanna retrieve from the same API, the same issue is happening, that is I see only last item of that specific field in the list, lets say I have Age : 20 , Age : 30 , Age : 40, in API, but I get only Age:40 in the list.

Thread Participants: 1

Tags for this Thread