如何调试不执行任何操作且不引发异常的 Spring Webflow 提交

Jer*_*ore 4 spring spring-mvc spring-webflow

我有 spring 2.5 应用程序,流程中的几个页面工作得很好 - 它们根据我的 flow.xml 进行。“损坏”的页面具有以下形式的提交:

<input type="image" name="_eventId_submit" src="<c:url value="images/continue.png" />" />
Run Code Online (Sandbox Code Playgroud)

此页面的流程定义看起来正确:

<view-state id="coverages" view="tiles.coverages" model="rtrForm">
    <on-entry>
 ...
    </on-entry>
    <transition on="submit" to="policyVehicleDetailsDecisionForward">
        <evaluate expression="coverageFormAction.bindAndValidate" />
        <evaluate expression="coverageFormAction.evaluateCoverages(rtrForm)" />
    </transition>
</view-state>
Run Code Online (Sandbox Code Playgroud)

我在 mainFlowAction.evaluateCoverages(...) 中有调试语句,我在日志文件中没有看到这一点,但我也没有看到任何异常 - 有人知道从这里去哪里吗?我已将 Eclipse 附加到 Tomcat 6.0.33 进行远程调试,但我仍然没有看到任何异常......这一点我很困惑,不知道如何解决这个问题 - 任何帮助或欢迎提出建议。

因此,我又采取了几个步骤,并重写了 QuoteFormAction.bindAndValidate() 方法,遗憾的是,我没有看到在日志中调用此方法 - 所以我此时假设该表单是甚至没有调用它......我对所有有效的页面使用相同的模式。我已经缩写了表格 - 也许我忽略了一些明显的事情:

<form id="rtrForm" action="/rtrSite/main.svc?execution=e1s5" method="post">
...
<select name="quoteForm.policyLevelCoverages.towing" class="violationType" id="TOWING"  validate="selectOneOption" req="">
...
<select name="quoteForm.vehicleLevelCoverages[0].rental" class="violationType" id="RENTAL"  validate="selectOneOption" req="">
...
<input type="image" name="_eventId_submit" src="images/continue.png" />
<input type="image" name="_eventId_save" src="images/save.png" value='Save -n- Return' />
<input type="image" src="images/back.png" name="_eventId_back" value='Back' />
<input type="reset" id="reset" />
</form>
Run Code Online (Sandbox Code Playgroud)

JSP 表单生成:

<c:forEach var="policyCoverageList" varStatus="policyCoverageStatus" items="${quoteForm.coverages.jspCoverageCodesPolLevel}">

          <spring:bind path="quoteForm.policyLevelCoverages.${fn:toLowerCase(policyCoverageList.coverageCode)}" >
           <select name="${status.expression}" class="violationType" id="${policyCoverageList.coverageCode}"  validate="selectOneOption" req="">
                <c:if test="${policyCoverageList.isRequired == 'N'}">
                   <option value="-1"><spring:message code="coverage.decline" /></option>
                 </c:if>
                 <c:forEach var="policyCoverage" items="${policyCoverageList.limits}">
                     <option value="${policyCoverage.id}" <c:if test="${policyCoverage == 'TODO'}">SELECTED</c:if>>
                          ${policyCoverage.coverageLimits}
                      </option>
                  </c:forEach>
              </select>
           </spring:bind>

</c:forEach>
Run Code Online (Sandbox Code Playgroud)

vsi*_*ngh 5

在记录器中打开调试级别

<logger
        name="org.springframework.webflow">
        <level value="debug" />
    </logger>
Run Code Online (Sandbox Code Playgroud)

您将在控制台/日志文件上看到消息,这将帮助您找出问题