我正在尝试使用JSF2.0、Weld、JPA2和Maven在GlassFish V3上构建一个JavaEE6应用程序。现在我在运行一个简单的<a4j:support>时遇到了麻烦。这是我的小例子的片段。当在inputtext中键入内容时,outputtext应该会自动更新。但是什么也没发生(火狐没有,IE8也没有)。
<ui:composition
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
(...)>
<h:inputText value="#{personHome.message}">
<a4j:support event="onkeyup" reRender="repeater"/>
</h:inputText>
<h:outputText id="repeater" value="#{personHome.message}"/>除此之外,我的示例不起作用,我的问题还在于我不太了解是否需要一个JSF实现(MyFaces、Richfaces、Primefaces等)。或者不使用a4j元素。它是glassfish中的“内置”吗?到目前为止,我只有以下JSF需要的依赖项:
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>所以..。要在GlassFish上的简单Java应用程序上运行Ajax4JSF,我必须做些什么?
发布于 2010-05-25 00:34:23
(...)它是glassfish中的“内置”吗?
作为JavaEE6服务器,GlassFish v3附带了JSF2.0实现(Mojarra2.0.2是RI)。
到目前为止,我在
(...)中只有以下依赖项。
我还会将JSF工件标记为provided。
顺便提一下,JSF2.0使用<f:ajax> (灵感来自RichFaces的<a4j:support> )提供内置的Ajax支持。
https://stackoverflow.com/questions/2897411
复制相似问题