【发布时间】:2016-03-08 15:07:37
【问题描述】:
我在 updatePerson.xhtml 中有这个 h:commandButton 来更新人员信息,但是当我单击它时,将调用页面操作方法 (controller.preUpdatePerson),就好像我再次进入此页面一样。我对页面操作的调用更加迷失了,因为此时 controller.preUpdatePerson 中的对象为空,然后它就停在这里了。
controller.update 永远不会被调用。 我不知道为什么会这样。所有实体和控制器都在对话范围内。我尝试了很多组合,这似乎不是交易问题。那么这里发生了什么?
系统规格:Seam 2.2.2 JSF 1.2
pages.xml:
<page view-id="/updatePerson.xhtml">
<action execute="#{controller.preUpdatePerson}" on-postback="false" />
<begin-conversation join="true" flush-mode="manual"/>
updatePerson.xhtml:
<a4j:form id="editPerson" styleClass="inline" enctype="multipart/form-data">
<h:commandButton id="editPerson" value="#{messages['button.save']}"
action="#{controller.update}"/>
...
【问题讨论】:
标签: jsf seam jsf-1.2 ajax4jsf seam2