JSF AJAX Render Multiple Field

JSF AJAX Render Multiple Field

In previous example you saw how to send single input field data through AJAX render response on client side. Here you will see how to send and render multiple form data through AJAX. We will use f:ajax tag which is Java Server Faces core tag which provides Ajax functionality to regular UI component if used in conjunction with that component. Ajax behavior will be added to input component by including f:ajax tag as below:

Steps:

  • All setup are same from this tutorial.
  • Create maven project name: JSFAJAXDemo and below is final project structure:

Note: If you are not sure how to create maven project in eclipse please follow steps from this tutorial

JSF AJAX Render Multiple Field

  • pom.xml:

  • web.xml:

  • JSFAJAXDemo.xhtml:

  • JSFAJAX.java:

  • Run this example in tomcat (If you are not sure how to configure and run tomcat in eclipse please follow steps from this tutorial) you will see below page:

JSF AJAX Render Multiple Field

  • Enter any value into input field and click submit button, you will see response as below:

JSF AJAX Render Multiple Field

  • For more information processing AJAX please see oracle tutorial here

download  Download Project:  JSFAJAXDemo

Leave a Reply

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