是什么导致Orbeon Forms在XForm上进行无限重新验证,直到它获得堆栈溢出

时间:2012-10-23 15:28:29

标签: orbeon

我使用的是Orbeon Forms CE版本orbeon-4.0.0.M11.201210030654-CE。

我有一个包含多个实例的XForm(XHTML),我在其中一个实例上使用required =“true()”进行绑定,并使用xxforms-invalid& xxforms - 有效切换案例。以下是我的xform中的一些代码示例。

<xforms:instance id="teaching-load-instance" src="oxf:/apps/uis-common/model/uis-teaching-load-xforms-instance.xml"/>

<xforms:bind nodeset="instance('teaching-load-instance')/teaching_load">
    <xforms:bind nodeset="module_id" required="true()"/>
</xforms:bind>

<xforms:action ev:event="xxforms-invalid" ev:observer="teaching-load-instance">
    <xforms:toggle case="invalid-form-case"/>
</xforms:action>

<xforms:action ev:event="xxforms-valid" ev:observer="teaching-load-instance">
    <xforms:toggle case="valid-form-case"/>
</xforms:action>

访问此xform页面时,将抛出stackoverflow错误。

以下是orbeon.log文件的调试日志。

2012-10-23 21:42:42,470 DEBUG XFormsServer  -         start dispatching {name: "xxforms-valid", target: "month-instance"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -           start performing default action {}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -           end performing default action {time (ms): "0"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -         end dispatching {time (ms): "0"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -         start dispatching {name: "xxforms-valid", target: "verification-instance"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -           start performing default action {}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -           end performing default action {time (ms): "0"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -         end dispatching {time (ms): "0"}
2012-10-23 21:42:42,470 DEBUG XFormsServer  -         start dispatching {name: "xxforms-valid", target: "modules-instance"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -           start performing default action {}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -           end performing default action {time (ms): "0"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -         end dispatching {time (ms): "1"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -         start dispatching {name: "xxforms-invalid", target: "teaching-load-instance"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -           start handler {name: "xxforms-invalid", phase: "target", observer: "teaching-load-instance"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -             interpreter - start executing {action name: "xforms:action"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -               interpreter - start executing {action name: "xforms:toggle"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                 start dispatching {name: "xforms-revalidate", target: "xf-2"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                   start performing default action {}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                     validation - start performing revalidate {model id: "xf-2"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "triggers-instance"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,471 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "parameters-instance"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       end dispatching {time (ms): "1"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "check-user-instance"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "main"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "temp"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "session"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,472 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "status-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       end dispatching {time (ms): "1"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "month-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "verification-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-valid", target: "modules-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         start performing default action {}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         end performing default action {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       end dispatching {time (ms): "0"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                       start dispatching {name: "xxforms-invalid", target: "teaching-load-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                         start handler {name: "xxforms-invalid", phase: "target", observer: "teaching-load-instance"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                           interpreter - start executing {action name: "xforms:action"}
2012-10-23 21:42:42,473 DEBUG XFormsServer  -                             interpreter - start executing {action name: "xforms:toggle"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                               start dispatching {name: "xforms-revalidate", target: "xf-2"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                 start performing default action {}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                   validation - start performing revalidate {model id: "xf-2"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "triggers-instance"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "parameters-instance"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "check-user-instance"}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,474 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     end dispatching {time (ms): "1"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "main"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "temp"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "session"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "status-instance"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,475 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "month-instance"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     end dispatching {time (ms): "1"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "verification-instance"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-valid", target: "modules-instance"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       start performing default action {}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       end performing default action {time (ms): "0"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     end dispatching {time (ms): "0"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                     start dispatching {name: "xxforms-invalid", target: "teaching-load-instance"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                       start handler {name: "xxforms-invalid", phase: "target", observer: "teaching-load-instance"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                         interpreter - start executing {action name: "xforms:action"}
2012-10-23 21:42:42,476 DEBUG XFormsServer  -                                           interpreter - start executing {action name: "xforms:toggle"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                             start dispatching {name: "xforms-revalidate", target: "xf-2"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                               start performing default action {}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                 validation - start performing revalidate {model id: "xf-2"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                   start dispatching {name: "xxforms-valid", target: "triggers-instance"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                     start performing default action {}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                     end performing default action {time (ms): "0"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                   end dispatching {time (ms): "0"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                   start dispatching {name: "xxforms-valid", target: "parameters-instance"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                     start performing default action {}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                     end performing default action {time (ms): "0"}
2012-10-23 21:42:42,477 DEBUG XFormsServer  -                                                   end dispatching {time (ms): "0"}

1 个答案:

答案 0 :(得分:1)

可以在XForms中创建无限循环,但在这种情况下,您似乎遇到了XForms引擎中的错误。如果案例没有改变,xf:toggle应该没有效果。我为此填写an issue,您可以跟踪。

自Orbeon Forms 4.0 M13以来,此问题已得到解决。对于早期版本,您可以在if上添加xf:toggle来解决此问题。假设您的交换机ID为my-switch

<xforms:toggle if="xxforms:case('my-switch') != 'invalid-form-case'"
               case="invalid-form-case"/>

加上另一个if的等效<xforms:toggle case="valid-form-case"/>