setFunctionLock(LockFunction.COMPILE, false);
String r = String.valueOf(new Date().getTime());
if (result.getOutputErrors().length == 0 && result.getOutputFiles().length > 0) {
String url = result.getOutputFiles()[0].getUrl() + "?r=" + r;
StaticActionDialog actionDialog = StaticActionDialog.get();
actionDialog.update("View Exported Document",
"A " + cmd.getExportFormat() + " version of the current " +
"document has been compiled and is available for viewing.",
new ActionDialogOption[] {
new ActionDialogOption("View " + cmd.getExportFormat() + " Document",
new SystemOpenPageCommand(currentDocument.getDocumentId() + "_exp", url, false))