Threaded View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    6
    Answers
    1
    Vote Rating
    0
    dannykopping is on a distinguished road

      0  

    Question Answered: Loading data into a component without a Store

    Answered: Loading data into a component without a Store


    Hi all!

    I'm a Flex refugee and I'm slowly making my way through ExtJS.
    I'm porting over an ActionScript 3.0 library for doing web-services to an open-source backend I've written, and I want to find out if there's any way to load data into an ExtJS component without a Store? Is this a really stupid question because I don't understand ExtJS yet?

    I'd appreciate any and all help!

  2. OK - I think I've solved the problem.

    I've got a callback on an AJAX request which runs the following code:

    Code:
    success: function(response){
        var list = Ext.getCmp("userlist1");
    
    
        var store = Ext.getStore("Users");
        list.bindStore(store);
    
    
        store.loadData(response);
    }
    I've got a component called userlist1 which I manually bind a Store to using the bindStore function, and then load the response data (which is an array of User model instances) into the Store. This example is using a predefined Store definition, but it's trivial to create a temporary Store on the fly (I'd imagine) and then bind that to a View.

Thread Participants: 1

Tags for this Thread