How to Integrate Java API in ExtJs

Mayuri Gavali5 years ago

Hi anton,
I am new in ExtJs I am trying to integrate java API to save record in extJs but it gives error. i.e. Ext.form.Basic.updateRecord(): A record is required.

Ernesto Vallejo5 years ago

Please elaborate

Mayuri Gavali5 years ago

It does not fetch the data from form. Here is my code. getting problem to function updateRecord(). It shows a record is required.

 onSaveClick: function (button) {
        var dialog, record, store;
        dialog = button.up('window').down('form');
        dialog.updateRecord();
        record = dialog.getRecord();
        
        if (record === Traccar.app.getUser()) {
            record.save();
        } else {
            store = Ext.getStore('Routes');
            if (record.phantom) {
                store.add(record);
            }
            store.sync({
                failure: function (batch) {
                    store.rejectChanges();
                    Traccar.app.showError(batch.exceptions[0].getError().response);
                }
            });
        }
        button.up('window').close();      
    }