【发布时间】:2014-01-03 17:32:08
【问题描述】:
我们正在从 jsf 1.2 升级到 jsf 2。 我们使用的是 apache myfaces 2.1 和 rich faces 4.3。
问题是,<a4j:commandButton> 标记 AJAX 功能似乎已损坏。
下面是xhtml文件。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:form prependId="false" id="questionsForm">
<!-- other form fields are not shown -->
<a4j:commandButton id="questions" value="Clear" action="#{bean.clearAction}"/>
</h:form>
</html>
单击“清除”按钮时,后端代码会执行,但会重新加载整个页面(页面再次刷新)。 预迁移代码可以完美运行,无需重新加载页面。
任何人都可以帮助如何让这个 AJAX 在富面孔标签中工作吗?
【问题讨论】: