ExtJS 4 Loading data into form panel from store/model or via form.load

[code] var contactModel = component.contactDetails; Ext.getCmp(‘EditContact_Form’).getForm().loadRecord( contactModel ); OR var form = this.getWebItemForm().getForm(); var data = this.getStore(‘WebItemsForm’).getAt(0); form.loadRecord(data); OR Ext.getCmp(‘patient-form’).getForm().load({ url:’formdata.php’, params:{moduleId:moduleId,action:’doAction’,activity:’getActivePatient’}, success:function(form,action) { var res = action.result; Ext.getCmp(‘patient_count’).setText(res.data.active_patient_count); }, failure:function(response) { } }); [/code]