I am using a tabpanel with two panels, where I am retrieving data through JSON. Retrieving data in the first tabpanel seems to work great, however, I can't parse the data retrieved from the JSON in the second tabpanel. Any ideas?
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: 'orgno'},
{name: 'firstname'},
{name: 'lastname'},
{name: 'address1'},
{name: 'postalcode'},
{name: 'postalarea'},
{name: 'phone1'},
{name: 'mobile'},
{name: 'fax1'},
{name: 'email'},
{name: 'www'},
{name: 'bankaccount'},
{name: 'member_password'},
{name: 'member_confirm_password'},
{name: 'butikknummer'}, {name: 'bransje'},
{name: 'kommentar'},
{name: 'apningstider_hverdag'},
{name: 'stengetider_hverdag'},
{name: 'apningstider_helg'},
{name: 'stengetider_helg'},
{name: 'butikk_navn'},
{name: 'butikk_addresse'},
{name: 'butikk_telefon'},
{name: 'butikk_poststed'},
{name: 'butikk_postnummer'}
]),
items: [{
// {
xtype:'tabpanel',
plain:true,
activeTab: 0,
height:405,
// defaults:{bodyStyle:'padding:15px'},
defaults:{bodyStyle:'padding:10px'},
items:[{
title:'Firmainformasjon',
//layout:'form',
//layout:'column',
layout:'column',
defaults: {width: 200},
//defaultType: 'textfield',
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,
www,
bankaccount,
member_password,
member_confirm_password
//bransje
]
}]
},{
title:'Butikkinformasjon',
//layout:'form',
//layout:'column',
layout:'column',
defaults: {width: 200},
//defaultType: 'textfield',
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,
apningstider_helg,
stengetider_helg,
bransje
]
}]
}]
And:
if(id!="" && id!="[object Object]" && id!=undefined)
{
registrationformPanel.form.load({url:'content/registercompany/registercompany.php?mode=editRegistercompany&id='+id,
waitMsg:'Loading'});
}