I have a tabpanel set up with two panels, and I am fetching data via JSON. The data retrieval works perfectly in the first tabpanel, but I'm facing issues parsing the JSON data in the second tabpanel. Any suggestions on how to approach this?
var registrationformPanel = new Ext.form.FormPanel({
frame:true,
border:true,
labelWidth: 125,
url:'content/registercompany/registercompany.php?mode=createRegistercompany',
sortInfo:{field: 'company_id', direction: "ASC"},
reader: new Ext.data.JsonReader({
root: 'results'
}, [
{name: 'company_id', sortType : 'int'},
{name: 'company_name'},
...
{name: 'butikk_postnummer'}
]),
items: [{
// {
xtype:'tabpanel',
plain:true,
activeTab: 0,
height:405,
defaults:{bodyStyle:'padding:10px'},
items:[{
title:'Firmainformasjon',
layout:'column',
defaults: {width: 200},
items: [{
columnWidth:.50,
layout: 'form',
items: [
company_id,
butikk_navn,
company_name,
orgno,
firstname,
lastname,
address1,
postalcode,
postalarea,
butikknummer,
kommentar
// apningstider_hverdag,
// stengetid_hverdag
]
},{
columnWidth:.50,
layout: 'form',
items: [
phone1,
mobile,
fax1,
email,
...
]
},{
title:'Butikkinformasjon',
layout:'column',
defaults: {width: 200},
items: [{
columnWidth:.50,
layout: 'form',
items: [
//butikk_navn,
butikk_addresse,
butikk_poststed,
apningstider_hverdag,
stengetider_hverdag
]
},{
columnWidth:.50,
layout: 'form',
items: [
butikk_telefon,
butikk_postnummer,
...
]
}]
And:
if(id!="" && id!="[object Object]" && id!=undefined)
{
registrationformPanel.form.load({url:'content/registercompany/registercompany.php?mode=editRegistercompany&id='+id,
waitMsg:'Loading'});
}