Results 1 to 3 of 3

Thread: Advice requested - Reusing an XML response to populate multiple datastores

  1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    118

    Default Advice requested - Reusing an XML response to populate multiple datastores

    Hi,

    I'm wondering whether it's possible to invoke a web-service (i.e. a login web services) that returns XML that can then be used to populate multiple data stores.

    The reason why I ask, is that my login XML response contains many elements, where those elements should populate independent data stores, i.e.

    <destinations>
    <destination id="1" name="woof"/>
    <destination id="2" name="banana"/>
    </destinations>
    <users>
    <user id="1" name="Rob"/>
    <user id="2" name="James"/>
    </users>

    I would like to perform the login request, then the XML be pushed into a destinationStore and userStore with different root elements ('destinations' and 'users').

    In addition, is this something that can be done within the designer, or something that would need to be coded manually.

    Thanks,
    Rob.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You could use:
    Code:
    store1.load({
      callback: function(){
        store2.loadData(store1.reader.xmlData);
      }
    });

  3. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    118

    Default

    Perfect, thanks. I do have another question relating to XML parsing, but I'll post that separately.

    Thanks,
    Rob.

Similar Threads

  1. Advice requested - server side session handling (launched from an IFrame)
    By RobWilson in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2011, 8:50 AM
  2. Problem with loading multiple datastores
    By mdb in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 6 Oct 2010, 4:12 AM
  3. Replies: 7
    Last Post: 17 Apr 2009, 6:20 AM
  4. Aggregating Multiple Datastores
    By yitzer in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 9 Jan 2008, 12:44 PM
  5. Update multiple DataStores in one XHR request?
    By Wolfgang in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 11 Apr 2007, 10:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •