How to write in memoryproxy in Ext.js

I am trying to use Extjs with a javascript view model. I have had success loading stores using JsonReader and the ext.data.memoryproxy class.

However, I want to write the changes to my javascript viewmodel. I tried adding jsonwriter to the writer property in the repository, but this will not work. I get this error:

uncaught exception: Ext.data.DataProxy: DataProxy tried to execute an API action, but found an undefined url / function. View the proxy server / api configuration url.

My code is:

var service = viewmodel.selectedService.analytes;

     var serviceResultsStore = new Ext.data.Store({
        reader: new Ext.data.JsonReader({
            fields: ['Analyte', 'Units', 'Value', 'Rounded', 'PossibleValues']

        }),
        proxy: new Ext.data.MemoryProxy(service),
           writer: new Ext.data.JsonWriter({
                    encode: false,
                    writeAllFields:true
                })

Any help on this would be greatly appreciated!

+5
source share
1 answer

JsonWriter MemoryProxy " . .
JsonWriter docs,

DataWriter Ext.data.Record CRUD.

JsonWriter extends DataWriter. DataWriter docs -

Ext.data.DataWriter , Ext.data.Store . Store Ajax CRUD .

, / , , , , ? ( CRUD )

+1

All Articles