Results 1 to 2 of 2

Thread: How to represent this data in models

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7

    Default How to represent this data in models

    The following XML data has <child> nodes that contain other <child> nodes.

    How would I represent this data using models? There could be many levels of nested <child> nodes, and each of them could themselves have child nodes.


    Code:
    <child>
        <accountId>339</accountId>
        <child>
            <accountId>884</accountId>
            <id>88366645</id>
            <name>Test Account One</name>
            <parentId>1042868</parentId>
        </child>
        <hasChildCompanies>true</hasChildCompanies>
        <id>1042868</id>
        <name>Test Account</name>
        <parentId>1020</parentId>
    </child>

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Have a look at the following for nested data:
    http://docs.sencha.com/ext-js/4-1/#!....reader.Reader

    You can also map a field : { name : 'field', mapping: 'parent.child' }

    Scott.

Posting Permissions

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