我正在尝试使用 JSF 2.0、Weld、JPA2 和 Maven 在 GlassFish V3 上构建 Java EE 6 应用程序。现在我很难进行简单<a4j:support>
的跑步。这是我的小例子的片段。在输入文本中输入内容时,输出文本应自动更新。但是什么也没有发生(不是在 Firefox 中,不是在 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 元素。它是玻璃鱼“内置”的吗?到现在为止,我只有以下我认为 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>
那么......我需要做什么才能让 Ajax4JSF 在 GlassFish 上的简单 Java EE-App 上运行?