Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJs Store.save()?

Tags:

commit

extjs

How do I handle the save() method of the data store on the back end.(my C# code)?
Do I need any extra config settings for the store to enable the save() method? If anyone could just point me in the right direction that would be great?

    var writer = new Ext.data.JsonWriter({
    encode: true
});

// create the Data Store
var store = new Ext.data.JsonStore({
    root: 'Data.items',
    idProperty: 'Empid',
    writer: writer,
    fields: ['Empid', 'Firstname', 'Surname', 'Username'],
    proxy: new Ext.data.HttpProxy({
        url: AppRootPath + 'EmployeeDetails/GetSAASUsers',
        method: 'POST'
    })//proxy
});//new Ext.data.JsonStore

Hod do i configure my stiore to support a save method which will update the records in the database?

like image 813
shane87 Avatar asked Mar 14 '11 11:03

shane87


1 Answers

Ext.data.Store.commitChanges() is a client-side-only method. It does not communicate with the server in any form. The method is used to reset the modification status of the store's records and persist their changes (on the client-side only).

Ext.data.Store.save() is the method that actually uses the configured connection to talk to your server-side application. To be able to provide more information you'd need to post some code snippets.

like image 65
Stefan Gehrig Avatar answered Oct 16 '22 18:10

Stefan Gehrig