Results 1 to 2 of 2

Thread: Missing ViewModel definitions in Sencha Docs example for binding association

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-15356 in 5.0.2.
  1. #1
    Sencha User
    Join Date
    Apr 2011

    Default Missing ViewModel definitions in Sencha Docs example for binding association

    Hi ,

    I am looking into the example of binding association as sited in sencha docs at below url

    The doc has details about the View part only and ViewModel definitions are missing. I am expecting that the missing ViewModel has the association definition, but is not yet added to the docs.

    I am not able to prepare the missing ViewModel with association details. I am expecting that this example would have 2 model definitions. 1 for Customers and the other for Orders. I am not able to prepare these 2 parts and make the connection between them.

    Can anyone help me in defining a sample ViewModel in this context.

    Last edited by riku351; 3 Oct 2014 at 12:14 PM. Reason: Wrong heading

  2. #2
    Sencha User
    Join Date
    May 2011


    The ViewModel does not have to be a separate class. In this example it is defined inline on the class body of the view:

        viewModel: {
            stores: {
                customers: {
                    model: 'Customer',
                    autoLoad: true
    The ViewModel defines the customers store, but does not need to define the orders store, because orders is an association store that is automatically generated by virtue of the association between customers and orders defined in the Order model.

    You are correct, though, the example is missing code preview for Customer and Order. We'll get this fixed. In the mean time you can see the code for those two models here:

Posting Permissions

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