Question

I'm trying load data from server and bind data. Such method does not work. Whats wrong?

Ext.define('Configurator.view.activityType.ActivityTypeModel', {
    extend: 'Ext.app.ViewModel',
    alias: 'viewmodel.activityTypeModel',
    stores: {
      ticketStatusSummary: {
       fields: ['id', 'title', 'name'],
       autoLoad: true,
       proxy: {
                url: '{prefix}/{entityName:uncapitalize}',
                pageParam: '{pagaParam}',
                startParam: '{startParam}',
                limitParam: '{limitParam}'
            }  }
    }
...
Was it helpful?

Solution

Problem is resolve. Problem is with the proxy - unknown reader

reader: {
            type: 'json',           
         }

Actual code:

Ext.define('Configurator.view.activityType.ActivityTypeModel', {
    extend: 'Ext.app.ViewModel',
    alias: 'viewmodel.activityTypeModel',
    stores: {
      ticketStatusSummary: {
       fields: ['id', 'title', 'name'],
       autoLoad: true,
       proxy: {
                url: '{prefix}/{entityName:uncapitalize}',
                pageParam: '{pagaParam}',
                startParam: '{startParam}',
                limitParam: '{limitParam}',
                reader: {
                        type: 'json',           
                }
            }  
        }
    }
... 

OTHER TIPS

Im surprised that you have to define all of this inside your viewcontroller...

You should be able to do: (I'm still trying to actually figure this out, I dont think it is the right code.)

stores:{
    ticketSummary:'MyApp.stores.TicketSummary'
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top