var1en
10 Apr 2007, 11:58 AM
not fires event "load"
var addressBody = addressPanel.getEl().createChild({tag:'div'});
// create the required templates
this.addressTemplate = new Ext.Template(
'<div id="{addr_id}" class="address-view"><address>'+
'{address}<br/>'+
'{city}, {state} {zip}<br/>'+
'{country}'+
'</address></div>'
);
this.addressTemplate.compile();
this.addressView = new Ext.JsonView(addressBody, this.addressTemplate, {
singleSelect: true,
jsonRoot: 'addresses',
emptyText : '<div style="padding:10px;">No address found</div>'
});
this.addressView.on({
load : function (view, data, response) {
alert('loadEvent');
},
loadexception : function (view, data, response) {
alert('loadExceptionEvent');
},
click : this.onClickAddressView.createDelegate(this)
});
var panel = new Ext.NestedLayoutPanel(this.addressLayout, { closable : false, background: !tabInfo.active, title: 'Addresses'});
panel.on('activate', function() {
this.addressView.load({url:this.addressViewUrl + 'id/'+ this.customerCardId +'/'});
}, this);
var addressBody = addressPanel.getEl().createChild({tag:'div'});
// create the required templates
this.addressTemplate = new Ext.Template(
'<div id="{addr_id}" class="address-view"><address>'+
'{address}<br/>'+
'{city}, {state} {zip}<br/>'+
'{country}'+
'</address></div>'
);
this.addressTemplate.compile();
this.addressView = new Ext.JsonView(addressBody, this.addressTemplate, {
singleSelect: true,
jsonRoot: 'addresses',
emptyText : '<div style="padding:10px;">No address found</div>'
});
this.addressView.on({
load : function (view, data, response) {
alert('loadEvent');
},
loadexception : function (view, data, response) {
alert('loadExceptionEvent');
},
click : this.onClickAddressView.createDelegate(this)
});
var panel = new Ext.NestedLayoutPanel(this.addressLayout, { closable : false, background: !tabInfo.active, title: 'Addresses'});
panel.on('activate', function() {
this.addressView.load({url:this.addressViewUrl + 'id/'+ this.customerCardId +'/'});
}, this);