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 6770741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:20:55+00:00 2026-05-26T15:20:55+00:00

Here is my model: Ext.define(‘A.model.Group’, { extend: ‘Ext.data.Model’, fields:[‘id’, ‘name’], proxy: { type: ‘rest’,

  • 0

Here is my model:

Ext.define('A.model.Group', {
    extend: 'Ext.data.Model',
    fields:['id', 'name'],
    proxy: {
        type: 'rest',
        url: '/group',
        reader: {
            type: 'json',
            root: 'data'
        },
        writer: {
            type: 'json',
            writeAllFields: false
        }
    }
});

The model is being used in a Tree via a TreeStore

The problem is that when a PUT, POST or DELETE method is done, instead of sending only fields from the model in the JSON payload, fields from Ext.data.NodeInterface are also sent. Here is an example payload:

{"id":"","name":"TestGroup","parentId":"8","index":0,"depth":3,"checked":null}

I don’t want the extra fields parentId, index, depth, and checked to be sent. What is the best way to do this? I don’t want to have to ignore them on the server.

  • 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-26T15:20:56+00:00Added an answer on May 26, 2026 at 3:20 pm

    If you wan’t to send only specific data to server, writeAllFields is not the solution as if is set to false it only sends the modified fields.
    The solution for your problem is defining your own writer and overriding the method getRecordData here is a posible example:

    var newWriter = Ext.create('Ext.data.writer.Json',{
      getRecordData: function(record){
           return {'id':record.data.id,'name':record.data.name};
      }
    })
    
    Ext.define('A.model.Group', {
        extend: 'Ext.data.Model',
        fields:['id', 'name'],
        proxy: {
            type: 'rest',
            url: '/group',
            reader: {
                type: 'json',
                root: 'data'
            },
            writer: newWriter
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: var comboStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url
Here's my code: class Publisher(models.Model): name = models.CharField( max_length = 200, unique = True,
I have 'Movie' model and hold data in Ext.data.Store. Movies are displayed in gridPanel.
On a sencha-touch, here's is my store declaration Ext.regStore('newsStore', { model: 'News', autoLoad: true,
here is my model class gameUserTrophyInfo(models.Model): user = models.ForeignKey(userInfo) trophy = models.ForeignKey(gameTrophyInfo) date =
Here is the model we are using to store the CC details how secure
I've got an interesting box-model problem here. I have a header full of links,
Here are the domain model classes: public abstract class BaseClass { ... } public
Here's a Django model class I wrote. This class gets a keyerror when I
Here is a Django model I'm using. class Person(models.Model): surname = models.CharField(max_length=255, null=True, blank=True)

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.