JSF simple ajax example

Here is a simple AJAX example in JSF (run on Glassfish).
Just to note: for sending the value to the bean you use the execute attribute of f:ajax, and for displaying the output from the beans’s getter, you use the render attribute.

1. pom.xml

2. The xhtml page:

Hello from Facelets

3. The Bean:

Leave a Reply

Your email address will not be published. Required fields are marked *