Get Ajax4JSF (a4j component) running on Glassfish

Posted by yournamehere on Stack Overflow See other posts from Stack Overflow or by yournamehere
Published on 2010-05-24T13:47:58Z Indexed on 2010/05/24 13:51 UTC
Read the original article Hit count: 307

Filed under:
|
|
|

I'm trying to build an JEE6-application on Glassfish V3, using JSF 2.0, Weld, JPA2 and Maven. Now i'm having trouble getting a simple <a4j:support> running. This is the fragment of my little example. When typing something into the inputtext, the outputtext should automatically be updated. But nothing happens (not in Firefox, not in 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}"/>

Beside that my example doesn't work, my problem is also that i don't really understand if i need a JSF implementation (MyFaces, Richfaces, Primefaces etc.) or not to use a4j elements. Is it "built-in" in glassfish? Until now, i only have the following dependencies i think i need in for 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>I'm trying to build an JEE6-application on Glassfish V3, using JSF 2.0, Weld, JPA2 and Maven. 

<dependency>
  <groupId>javax</groupId>
  <artifactId>javaee-api</artifactId>
  <version>6.0</version>
  <scope>provided</scope>
</dependency>

So... what do i have to do to get Ajax4JSF running on a simple JEE-App on Glassfish? Any help is highly appreciated!

© Stack Overflow or respective owner

Related posts about jsf2

Related posts about glassfishv3