1. #1
    Sencha User
    Join Date
    Sep 2007
    Posts
    14
    Answers
    2
    Vote Rating
    0
    mrbaseball34 is on a distinguished road

      0  

    Default Answered: Populating list via ajax?

    Answered: Populating list via ajax?


    Took a look at this turorial for using list control: http://www.sencha.com/learn/meet-the-list-component/

    How would I populate the list from ajax?

  2. You first assign a store to a list (either in the config for the list, or using setStore). You then assign a proxy to the store (either through config for the store, or using setProxy). Lastly, you execute myStore.load(). The list should populate automatically.

    Example:

    Code:
    myList.setStore(myStore);
    myStore.setProxy({
      type: 'ajax',
      url: someUrl,
      reader: {type: 'json'}
    });
    myStore.load();

  3. #2
    Sencha User
    Join Date
    Apr 2011
    Posts
    40
    Answers
    2
    Vote Rating
    2
    clubby is on a distinguished road

      0  

    Default


    You first assign a store to a list (either in the config for the list, or using setStore). You then assign a proxy to the store (either through config for the store, or using setProxy). Lastly, you execute myStore.load(). The list should populate automatically.

    Example:

    Code:
    myList.setStore(myStore);
    myStore.setProxy({
      type: 'ajax',
      url: someUrl,
      reader: {type: 'json'}
    });
    myStore.load();

Thread Participants: 1