smolloy
12 Mar 2007, 1:49 PM
I am having trouble with the UpdateManager.on("update", function....) method (including the script eval) - it doesn't seem to fire. In the below code, I am able to log the "beofreupdate" event, but nothing is logged for the "update" event AND the scripts in the returned HTML are not eval'd. I have traced the code, and it seems like it's not getting to the section where it runs event handlers, but I don't know why. Here's the code:
var orderSubLayout = new Ext.BorderLayout(tempDIV, {autoCreate: true,
center: {
autoScroll: true,
titlebar: false,
},
north: {
split:false,
initialSize: 30,
collapsible: true,
animate: false,
autoScroll: false,
minSize:30,
titlebar: false
}
});
orderSubLayout.beginUpdate();
var orderTab = new Ext.ContentPanel("orderContent"+orderID, {autoCreate: true});
orderTab.getUpdateManager().setDefaultUrl("/admin_tools/framework/right_panes/orderDetail.asp?invoiceID="+orderID);
orderTab.getUpdateManager().refresh();
var orderTabButtons = new Ext.ContentPanel("orderButtons"+orderID, {autoCreate: true, closable: false});
orderTabButtons.setUrl("right_panes/orderDetailButtons.asp?invoiceID="+orderID);
orderTabButtons.getUpdateManager().on("beforeupdate", function (object){console.log('beforeupdate');}, this, true);
orderTabButtons.getUpdateManager().on("update", function (object){console.log('update');}, this, true);
orderSubLayout.add('center', orderTab);
orderSubLayout.add('north', orderTabButtons);
orderSubLayout.endUpdate();
var returnData = MasterLayout.layout.add('center', new Ext.NestedLayoutPanel(orderSubLayout, {id: "order"+orderID, title: 'Order #'+orderID, closable: true}));
var orderSubLayout = new Ext.BorderLayout(tempDIV, {autoCreate: true,
center: {
autoScroll: true,
titlebar: false,
},
north: {
split:false,
initialSize: 30,
collapsible: true,
animate: false,
autoScroll: false,
minSize:30,
titlebar: false
}
});
orderSubLayout.beginUpdate();
var orderTab = new Ext.ContentPanel("orderContent"+orderID, {autoCreate: true});
orderTab.getUpdateManager().setDefaultUrl("/admin_tools/framework/right_panes/orderDetail.asp?invoiceID="+orderID);
orderTab.getUpdateManager().refresh();
var orderTabButtons = new Ext.ContentPanel("orderButtons"+orderID, {autoCreate: true, closable: false});
orderTabButtons.setUrl("right_panes/orderDetailButtons.asp?invoiceID="+orderID);
orderTabButtons.getUpdateManager().on("beforeupdate", function (object){console.log('beforeupdate');}, this, true);
orderTabButtons.getUpdateManager().on("update", function (object){console.log('update');}, this, true);
orderSubLayout.add('center', orderTab);
orderSubLayout.add('north', orderTabButtons);
orderSubLayout.endUpdate();
var returnData = MasterLayout.layout.add('center', new Ext.NestedLayoutPanel(orderSubLayout, {id: "order"+orderID, title: 'Order #'+orderID, closable: true}));