Results 1 to 3 of 3

Thread: Help With Row Widget Not Populating?

  1. #1
    Sencha MVP Team Member
    Join Date
    Sep 2016
    Location
    Kennewick, WA
    Posts
    153
    Answers
    15

    Default Answered: Help With Row Widget Not Populating?

    As demonstrated in the link to my Fiddle of the issue..

    I pull data dynamically from the server, populate a grid and include the rowwidget. When clicking on the +, the data in the expanded area does not populate. It seems to loop through correctly in count only as the number of rows reflect the number of contacts but the datamodel for contacts does not appear to be linked correctly the the parent owner model. I've tried several examples and references including Sencha documentation but I must be missing something in the translation.

    Could you please point me in the right direction to get these models linked correctly so data actually appears?

    https://fiddle.sencha.com/#view/editor&fiddle/25o8

  2. You are trying to bind a store to a model field (which is an array) that is not a valid store or store configuration. By binding the field to the store's data configuration, you should be fine.
    So you need to change this
    Code:
    store: '{record.contacts}'
    with this
    Code:
    store: {
        data: '{record.contacts}'
    }

  3. #2

    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64

    Default

    You are trying to bind a store to a model field (which is an array) that is not a valid store or store configuration. By binding the field to the store's data configuration, you should be fine.
    So you need to change this
    Code:
    store: '{record.contacts}'
    with this
    Code:
    store: {
        data: '{record.contacts}'
    }

  4. #3
    Sencha MVP Team Member
    Join Date
    Sep 2016
    Location
    Kennewick, WA
    Posts
    153
    Answers
    15

    Default

    Thank you chramer, it is working like a charm...

  5. #4
    Sencha Premium Member
    Join Date
    Feb 2016
    Posts
    12

    Default

    I am having a similar issue, in this example i am loading 'contacts' in another store. Both my parent and child models are dynamically loaded with ajax calls..

    1. I am able to load Parent store
    2. In the expandbody event, I am loading the child store. The child model references the id of my parent model (in my case i have 4 fields that are common)
    3. Given i don't have direct association to the child, below is how i am assigning the children to the parent in the callback function of the child store
    Code:
    // This is done in the controller
    contactStore.load({
        callback: function(records, operation, success) {
            if (success == true) {
                debugger;
                record.contacts = records;
    } else {
                // the store didn't load, deal with it
    console.log("Cannot load contacts");
            }
        },
        });
    4. I am trying to access this data in rowwidget like below,

    Code:
    bind: {
        store: {
            data: '{record.contacts}'
    }
    }
    5. I don't see the child nodes populating. Can you please tell me what am I doing wrong ?

Similar Threads

  1. [OPEN] Progress Widget in Grid Widget Column applies wrong CSS class
    By agarberi in forum Ext JS 6.x Bugs
    Replies: 3
    Last Post: 16 Dec 2016, 12:51 AM
  2. Replies: 2
    Last Post: 3 May 2016, 11:39 AM
  3. Replies: 1
    Last Post: 28 Apr 2016, 12:24 PM
  4. Replies: 2
    Last Post: 20 Sep 2014, 4:12 AM
  5. Table widget not populating from server using loader
    By Manuel Elaraj in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 10 Jun 2008, 11:05 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
  •