1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    33
    Answers
    3
    Vote Rating
    1
    Forn is on a distinguished road

      0  

    Default Answered: form.updateRecord dont word

    Answered: form.updateRecord dont word


    Hello. I have the next work:
    Code:
    formPersonalData = Ext.getCmp('formPersonalData').getForm();
            if (formPersonalData.isValid()){
                formPersonalData.updateRecord(currentCustomer);
                currentCustomer = formPersonalData.getRecord();
                currentCustomer.save({
                    success: function(record){
                        Ext.Mesg.alert('Сообщение', 'Данные сохранены.');
                    },
                    failure: function(record){
                        Ext.MessageBox.show({
                            title: 'Ошибка',
                            msg: 'Ошибки при сохранении данных. Обратитесь к администратору.',
                            buttons: Ext.MessageBox.OK,
                            icon: Ext.MessageBox.ERROR
                        });
                    },
                })
            }
    but when the update request send the data in the currentCustomer is that is was before changes in the form.

    What I do wrong?

  2. Problem was solved I must add name for each element except Id.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps if you switch the order of these 2 lines?:

    Code:
    formPersonalData.updateRecord(currentCustomer);
    currentCustomer = formPersonalData.getRecord();
    Regards,
    Scott.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    33
    Answers
    3
    Vote Rating
    1
    Forn is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Perhaps if you switch the order of these 2 lines?:
    Not work. In documentation formPersonalData.updateRecord(currentCustomer); - this must update the currentCustomer from form field, but it not work

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    33
    Answers
    3
    Vote Rating
    1
    Forn is on a distinguished road

      0  

    Default


    Problem was solved I must add name for each element except Id.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."