JSF 1.2 tutorial with examples for beginners – Java Server Faces

Welcome to world of Java Server faces (JSF). In this JSF tutorial you will learn basic and advanced examples. Moreover, we will demonstrate examples using Eclipse and Apache tomcat Server.

JSF is used to develop rich user interface web application. JSF provides a rich quantity of UI components to develop a wonderful web application.

Some more points about JSF

Till now we have developed 19 web applications in JSF. We will share our experience with you.

In 2008 we started developing application in JSF. Inspite of knowledge in Struts 1 & 2, we preferred to develop application in JSF. As JSF has rich UI components.

Compare to Struts, JSF has reduced the complexity of coding. As page design, navigation between two pages, validations and many more things are easy in JSF as compared to Struts.

Now at the time of writing this tutorial current version of JSF is 2 and Struts is 2. In this JSF tutorial we will learn JSF 1.2 with examples.

Tutorial 1 – Basic Examples In JSF :

  1. JSF Hello World Example – In this JSF Example we will demonstrate hello world example in JSF
  2. Using Java Script In JSF – In this JSF example we will demonstrate how to use Java Script in JSF. We will see how can we validate attributes in JSF.

Tutorial 2 – Selection Tags in JSF with Examples :
JSF has seven tags for making selections:

  1. JSF Select Boolean Checkbox (h:selectBooleanCheckbox) Example – In this example we will demonstrate how to use Select Boolean Checkbox (h:selectBooleanCheckbox) in JSF.
  2. JSF Select Many Checkbox (h:selectManyCheckbox) Example – In this example we will demonstrate how to use Select Many Checkbox (h:selectManyCheckbox) in JSF.
  3. JSF Select One Radio (h:selectOneRadio) Example – In this example we will demonstrate how to use Select One Radio (h:selectOneRadio) selection tag in JSF.
  4. JSF Select One Listbox (h:selectOneListbox) Example – In this example we will demonstrate how to use Select One Listbox (h:selectOneListbox) in JSF.
  5. JSF Select Many Listbox (h:selectManyListbox) Example – In this example we will demonstrate how to use Select Many Listbox (h:selectManyListbox) in JSF.
  6. JSF Select One Menu (h:selectOneMenu) Example – In this example we will demonstrate how to use Select One Menu (h:selectOneMenu) in JSF.
  7. JSF Select One Menu (h:selectManyMenu) Example – This example is in process. We will publish it soon. Till now please take help from other resources.

Tutorial 3 – Data Tables (h:dataTable) Example In JSF :

Data table (h:dataTable) is one of the most required UI component which is used widely in every web project. Data table (h:dataTable) is being used to display list of objects in well organized way.
JSF Data Table (h:dataTable) Example – In this example we will demonstrate how to use Data Table (h:dataTable) in JSF.

Tutorial 4 – Other JSF Examples :
JSF Graphic Image (h:graphicImage) Example – In this example we will demonstrate how to use Graphic Image in JSF.

Tutorial 5 – Internationalization, i18n, Message Bundle, Resource Bundle in JSF :
we will demonstrate how to implement internationalization, localization, i18n in JSF with Examples. We have two ways in JSF to do internationalization, localization, i18n.

  1. Load Bundle (f:loadBundle) – Load Bundle (f:loadBundle) can be used directly in JSF pages.
  2. Resource Bundle  – Resource Bundle can be configured in faces-config.xml file and can be reused in JSP pages.

Here is an example to demonstrate how to use Load Bundle (f:loadBundle) in JSF.

JSF Load Bundle (f:loadBundle) Example – In this example we will demonstrate how to use Load Bundle (f:loadBundle) in JSF. We will see how to use .properties in JSF. We will retrieve values of .properties file using f:loadBundle component of JSF.

Read this also – Difference between Action and Action Listener in JSF

Comments (0)

Leave a Reply

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