Fredric Berling
09-18-2007, 09:11 AM
I am deleting a document with this function..and my goal is to close the document tab and then refresh the content in the view to NOT show the deleted document. Using ths code , the view does not refresh..what am i doing wrong?...other approach?
I am using the Alpha2 R1 Ext.nd database (where the DominoUI is used).
this.deleteDocument = function(asUNID) {
if (asUNID != '') {
if (confirm('Are you sure you want to delete this document?'))
location.href = webPath + '/' + webView + '/' + asUNID + webQueryChar + 'DeleteDocument';
var panel = false;
panel = parent.ViewTemplateDefault.ui.layout.getRegion('center').getActivePanel();
try {
panel = parent.ViewTemplateDefault.ui.layout.getRegion('center').getActivePanel();
}catch(e) {
}
if (panel) {
var center = parent.ViewTemplateDefault.ui.layout.getRegion("center");
var centerPanel = center.getPanel('extnd-view');
centerPanel.refresh()
parent.ViewTemplateDefault.ui.layout.getRegion('center').remove(panel);
} else {
window.close();
}
}
}
I am using the Alpha2 R1 Ext.nd database (where the DominoUI is used).
this.deleteDocument = function(asUNID) {
if (asUNID != '') {
if (confirm('Are you sure you want to delete this document?'))
location.href = webPath + '/' + webView + '/' + asUNID + webQueryChar + 'DeleteDocument';
var panel = false;
panel = parent.ViewTemplateDefault.ui.layout.getRegion('center').getActivePanel();
try {
panel = parent.ViewTemplateDefault.ui.layout.getRegion('center').getActivePanel();
}catch(e) {
}
if (panel) {
var center = parent.ViewTemplateDefault.ui.layout.getRegion("center");
var centerPanel = center.getPanel('extnd-view');
centerPanel.refresh()
parent.ViewTemplateDefault.ui.layout.getRegion('center').remove(panel);
} else {
window.close();
}
}
}