当我单击命令按钮,然后将浏览器返回按钮单击到表单并再次单击它时,它会再次提交而不会引发正确的异常...
更奇怪的是,当我回来时,表单 id 本身是不同的,这意味着它在某个时候重新生成了一个“有效”的表单 id。
这是相关代码:有什么想法吗?
<h:form id="accountActivationForm">
<s:token/>
<a4j:commandButton id="cancelActivateAccountButton"
action="#{controller[cancelAction]}"
image="/images/button-Cancel-gray.gif"
reRender="#{reRenderList}"
oncomplete="#{onCancelComplete}" />
 
<a4j:commandButton id="activateAccountButton"
action="#{controller[agreeAction]}"
image="/images/button-i-agree-continue.gif"
styleClass="activate-account-button"
reRender="#{reRenderList}"
oncomplete="#{onActivationComplete}"/>
</h:form>
说明:
- 我继承了这个,所以我试图尽可能少地改变它。(它在几个地方使用。)
- 每个动作都返回一个视图,而不是 null。我已经逐行确认了这一点。
- 在我当前的测试用例中, reRenderList 是空的。
- onActivationComplete 也是空的。
我将逐个模板查看是否有人使用嵌套表单制作它,因为我的同事因此遇到了不相关的问题,因此将其作为可能的问题消除不会有什么坏处。