Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7406079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:30:04+00:00 2026-05-29T05:30:04+00:00

ExtJS version is ext-4.0.7-gpl . When syncing a Store, the server returns me the

  • 0

ExtJS version is ext-4.0.7-gpl.

When syncing a Store, the server returns me the same object in JSON format, but populated with generated Ids, that I need to put into my store data. The identifiers are in enclosed entities, like this:

{
    "id": 46,
    "name": "Excel",
    "typeExt": [{
        "ext": "xls",
        "id": "137",
        "isMain": "false",
    }, {
        "ext": "xslx",
        "id": "136",
        "isMain": "false",
    }]
}

So the ids 137 and 136 are generated on server-side.

I am trying to make it in a store’s proxy (edit: Ajax type) (which itself could be wrong):

proxy.afterRequest = function(request) {
     if (request.action === 'create' && request.records.length == 1) {
         me.store.autoSync = false;
         var created = Ext.JSON.decode(request.operation.response.responseText);
         request.records[0].set('id', created.id);
         request.records[0].set('typeExt', created.typeExt);
         //request.records[0].modified = {};
         //request.records[0].dirty = false;
         me.store.autoSync = true;
     }
     if (request.action === 'update' && request.records.length == 1) {
         var updated = Ext.JSON.decode(request.operation.response.responseText);
         me.store.autoSync = false;
         request.records[0].set('typeExt', updated.typeExt);
         me.store.autoSync = true;
     }

 };

See the commented variants.

If I don’t set autoSync to false, it gets looped infinitely.

If I don’t clear those read-only fields modified and dirty, the modified records are included in the next syncronization request, if I edited another record, it sends an Array of records which breaks my server-side service.

If I clear dirty and modified like it is shown in the commented lines, the update operation works only once. I press Update button in RowEditing plugin dialog, but it never sends the needed request to the server for the second time.

In the latter case I guess I broke something by hand-editing the readonly fields, but I can not find what.

How do people usually handle issues liek this?

PS.

request.records[0].commit(true); || request.records[0].editing = false; 

|| request.records[0].beginEdit(); 

Were tried with no seccess too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:30:04+00:00Added an answer on May 29, 2026 at 5:30 am

    I have this working for grids stores with Ext 4.0.7, but having similar issues with tree stores. All this with a direct proxy (and autosync true)

    If you look at the code of Ext.data.Store::onCreateRecords, you’ll see that the store records are replaced by those returned from the server, given the order is the same.

    So, it is pretty straight-forward: just return from the server the same json/object sent to the create method, but with the id set and it should update them automatically on the store.

    I know this is of not much help, but perhaps will give you some direction.

    I think it would help if you mention:

    • the type of proxy you’re using
    • the exact ext version
    • perhaps the code initiating the creation of the record
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ExtJS has Ext.each() function, but is there a map() also hidden somewhere? I have
In ExtJS version 3, there was a property grid in Ext.grid.RowSelectionModel and in version
how can I expand an ExtJS (version 3.3.1) Component, e.g. a Ext.Panel nested somewhere
ExtJS Charts, I am using an Ext column chart and I want to implement
How do you implement a multiselect combobox as part of a Ext.FormPanel using ExtJs?
I've configured extjs store to load data from useragentstring.com api, this api return data
So I have a need to create an ExtJS component (version 2.3.0). The component
I'm using the Sencha ExtJS Framework in Version 4.05 and i have the following
I'm trying to implement a tinyMCE editor into an ExtJs environment. But it's not
I have an ExtJS combobox with a remote data store behind it. In all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.