禁用“离开站点?”关闭 Orbeon 表单窗口时弹出

问题描述

我们有一些 Orbeon 表单并且不希望 Orbeon 保存我们的控制值,因为我们在 POST 方法中将它们作为 xml 发送。我们将 properties-local.xml 文件中的“then save”行替换为“then send”行。但是当我们单击提交按钮(并成功获取 xml)并关闭 Orbeon 窗口时,会出现一个“离开站点?您所做的更改可能无法保存。弹出窗口出现。 有没有办法禁用这个弹出窗口?

我们的properties-local.xml的相关部分:

<property as="xs:string" name="oxf.fr.detail.process.submit.myappname.*">
    require-uploads
    then validate-all
    then send(uri="http://myuri",method="POST",content="xml")
    then new-to-edit
    then success-message("save-success")
    recover error-message("database-error")
</property>

解决方法

在您的流程中,在以 recover 开头的行之前,添加:

set-data-status(status = "safe")

有关此操作,请参阅 its documentation