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

  • SEARCH
  • Home
  • 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 8506165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:31:14+00:00 2026-06-11T02:31:14+00:00

Good Evening guys, When I update the method it does not save all model

  • 0

Good Evening guys,

When I update the method it does not save all model items like “tipoNo” and “pai”. Someone know what i can do ?

Request Payload

This is the information sent in the request.

{"parentId":1,"nome":"qwfqwfqw"}

Model:

Fields in the my model.

fields : [ {
    name : 'id',
    type : 'long'
},{
    name : 'pai',
    type : 'long'
}, {
    name : 'nome',
    type : 'string'
}, {
    name : 'tipoNo',
    type : 'string'
}, {
    name : 'leaf',
    type : 'boolean',
    convert : function(value, record) {
        var no = record.get('tipoNo');
        return (no == "CLIENTE" ? true : false);
    }
} ],

Proxy

Proxy to requisite information on the server.

proxy : {
    type : 'rest',
    url : Webapp.link('node'),
    reader : {
        type : 'json',
        root : 'nodes',
        idProperty : 'id'
    },
    writer : {
        type : 'json',
        writeAllFields : false
    }
}

Controller Method

/**
 * Rename
 * 
 * @param {Ext.grid.plugin.CellEditing} editor
 * @param {Object} e                            
 */
updateList : function (editor, e) {
    var node = e.record;
    node.save({
        success: function(list, operation) {
            console.log("updated");
        },
        failure: function(list, operation) {
            var error = operation.getError(),
                msg = Ext.isObject(error) ? error.status + ' ' + error.statusText : error;

            Ext.MessageBox.show({
                title: 'Notificação',
                msg: msg,
                icon: Ext.Msg.ERROR,
                buttons: Ext.Msg.OK
            });
        }
    });
},
  • 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-06-11T02:31:15+00:00Added an answer on June 11, 2026 at 2:31 am

    Solution in this case:

    /**
     * Executa a edição
     * 
     * @param {Ext.grid.plugin.CellEditing} editor
     * @param {Object} e                            
     */
    updateList : function (editor, e) {
        var node = e.record;
        var me = this;
        var nodeTree = me.getNodeTree();
    
        var method = (node.data.id !== undefined ? 'PUT' : 'POST');
        var post = {
                id: (node.data.id !== undefined ? null : node.data.id),
                nome: node.data.nome,
                pai: (node.data.parentId == -1 ? null : node.data.pai),
                tipoNo: node.data.tipoNo
        };
        Ext.Ajax.request({
            url: Webapp.link("node"),
            headers: { 'Content-Type': 'application/json' }, 
            jsonData: post,
            method: method,
            success: function(response){
                var text = response.responseText;
                console.log(text);
                nodeTree.refreshView();
            }
        });
    
    },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good evening all, I'm trying to write a method that creates and returns a
Good evening guys. I'm currently trying to get started on development of a project
Good morning/afternoon/evening guys Here is the thing. I'm making a registering gsp that it
Good evening, I'm having an issue with Masonry. This is all my relevant code:
Good evening, I would like to have a navigation bar which is centralised to
Good evening all, I've been working on an MD5 tool in C# that takes
Good evening guys, I'm trying to pass multiple checkbox values through AJAX and process
Good evening guys, how can I run a piece of jQuery/ajax when a certain
Good Evening All, I've created the following stored procedure: CREATE PROCEDURE AddQuote -- Add
Good Evening All, A client has asked that I develop a web application as

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.