Data validation is a key element of every application and JSF makes no exception to it. In this tutorial we will introduce the basic concepts of JSF validation using the validation options available since JSF 2.0.
JSF
Faces Flow tutorial
This tutorial discusses about Faces Flow which is an addition to Java Server Faces 2.2, included in the Java EE 7 stack. Faces Flow has been inspired by the popular Spring Flow framework and as such it is not intended to be a replacement for the Web application navigation system; rather Faces Flow can be … Read more
JSF custom tags using Java classes
This is the second tutorial about creating JSF custom tags. In this one we will show how to create Java based JSF custom tags. Creating a custom Java based JSF tag in the early JSF 1.2 specification required pretty a lot of work and several configuration files to be handled. We will now show how … Read more
Storing data in your JSF 2.0 application
In this tutorial we will compare the available options for storing Object data into a Web application, showing at first the core JSF 2 scopes and the extension provided by CDI. Core JSF scopes JSF 2.0 specification defines the following scope scopes for storing data: @RequestScoped @ViewScoped @SessionScoped @ApplicationScoped @CustomScope Using the Request scope is … Read more
JSF ViewScoped tutorial
The @ViewScoped has been introduced by JSF 2.0 specification. In a nutshell the data which is @ViewScoped will keep living as long as you don’t navigate to another pagee to itself. The view scope is very convenient, since it allows the pattern of initializing data when you first access a page (via a non-faces request, which is typically a GET request) and then keep that data when you work on the page, doing postbacks, AJAX requests, etc.
How to call a method with parameters in JSF
The simplest (and most powerful) way to pass parameters is via JSF method expression which has been introduced in JSF 2.0 and EL 2.2. So this is only possible if you’re running on a Servlet 3.0 / EL 2.2 capable container like Tomcat 7, Glassfish 3, JBoss AS 6, etc and your web.xml is been … Read more
Java EE 6 example application
Today you can find many articles showing Java EE 6 examples and new features. However it’s missing a complete tutorial showing how to design and deploy a sample Java EE 6 application on JBoss AS 6. While it’s not intended to be the “the right” way to design Java EE 6 applications, this tutorial can … Read more