Results 1 to 3 of 3

Thread: Is it possible to reload a form after saving?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Jan 2012
    Vote Rating

    Default Answered: Is it possible to reload a form after saving?

    I am using Ext JS 4.1.0.

    I have a form where a user enters a name. After saving the server piece will look up additional information for the name provided and puts that into the model. I have tried many, many ways but I have been unable to get the new data reloaded into the form. The record that is passed into the success function after saving still has an id of 0 and not the "real" id that gets updated when sent to the server to be saved. Since the id is 0, I have no way of loading the record.

    How can this be done?

    Here is some code that does not work:
    buttons: [{
       text: 'Save',
       handler: function() {
          var form = this.up('form').getForm();
          var record = form.getRecord();
          if  (record) {
                success: function(rec) {
                   var comp = Ext.ComponentQuery.query('myForm');
                   var form = comp[0].getForm();

  2. Shouldn't be a reason why you couldn't do that.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts