function viewRefresh() { view.refresh(); } var waitMsgWnd = null; function doRefreshDocs() { var retVal = ShowModalPopup("/"+dbPath+"/RunRefreshDocs?OpenPage","",240,130); if (retVal) { waitMsgWnd = OpenDialogCentered("","RefreshAction_waitMsgWnd",300,60); doRefreshDocsStep2(retVal); } //OpenDialogCentered("/"+dbPath+"/RunRefreshDocs?OpenPage","RefreshAction_waitMsgWnd",300,60); } function doRefreshDocsStep2(option) { if (option == 'selected') { // returns a java.util.Vector containing doc id's var docsV = view.getSelectedDocumentsEx(); var unidList = ""; for (var enum1 = docsV.elements(); enum1.hasMoreElements(); ) { var unid = enum1.nextElement(); unidList += unid; if (enum1.hasMoreElements()) { unidList += ' '; } else { break; } } if (unidList.length > 0) { // unidList must be use space as a delimiter, which the agent // will see as '+' characters document.RunRefreshAgent.selection.value = unidList; } else { waitMsgWnd.close(); waitMsgWnd = null; alert ('Please select a valid document by clicking once on its title'); return; } } else if (option == 'all') { document.RunRefreshAgent.selection.value = '*'; } waitMsgWnd.document.close(); waitMsgWnd.document.write("