Results 1 to 2 of 2

Thread: viewModel link load callback or event help

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    46
    Answers
    3

    Default viewModel link load callback or event help

    I am dynamically creating a form like this, with also passing in a new model as part of the links config:

    Code:
    this.createTab(record, {
        xtype: 'editform',
        viewModel: {
            links: {
                additionalData: {
                    reference: 'MyApp.model.AdditionalData',
                    id: record.getId()
                }
            },
            data: {
                entry: record
            }
        }
    });
    However the form is rendered before the AdditionalData model is loaded, and I don't know what to trigger some event that tells my form or controller this model has been loaded...This wouldn't be an issue if I 2-way binded my form, but the form is just 1 big html text editor, and 2 way binding this large field is wonky, like the cursor moves all over the place and sluggish. This is fine, so I want to set the field manually. What can I do to populate this form field upon the model being loaded from the server?

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    To make sure we're on the same page with your testing can you post a complete test case that demonstrates what you're wanting to do either here or at https://fiddle.sencha.com?

Posting Permissions

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