Today is Tuesday, 17th January 2017

Archive for the ‘JavaServer Faces (JSF)’ Category


JSF: Handling Dates in JSF Forms

In this article, I show you code examples on how to handle dates in JSF forms.

The project consists of three files:
– StudentTest.java
– student_date_test_form.xhtml
– student_date_test_response.xhtml

The user enters the student data into the form: first name, last name and hire date. The input format for the hire date is day, month, year. As an example For 1 May 2016, you would enter: 1-5-2016.

form

Once the form is submitted, then the app will show the output.

result

 

Here’s the code. Enjoy!


File: StudentTest.java


File: student_date_test_form.xhtml


File: student_date_test_response.xhtml

Share


FAQ: What is the difference between JSF and JSP?

In a nutshell, JSP is suitable for small web projects and JSF is best for large scale enterprise projects.

JSP is an older technology … but it is still viable for smaller web apps. I like to use it for training since it is very similar to PHP. Most Java newbies can pick it up with no problem because it is simple and straight-forward.

Think of JSP as your low-end, economy car. It will get you to your destination but no special bells and whistles. It is ike flying “economy/coach” class.

If you are building a modern, large-scale, enterprise app then I’d recommend JSF. The framework provides data binding, validation, bean support etc.

Think of JSF as your luxury vehicle. It will get you to your destination in style … however with additional up-front luxury costs. It is like flying “first class”.

Hopefully this helps.

 

Share


JSF Tutorial #19 – JavaServer Faces Tutorial (JSF 2.2) – Summary and Premium Course Discount

In this video, I summarize the JSF tutorial and also discuss a special discount for the course.

Please SUBSCRIBE to my YouTube channel.

 


Download JSF Source Code

# Video
1 Introduction
2 JavaServer Faces Overview
3 Setting up your Development Environment - Overview
4 Installing Tomcat - MS Windows
5 Installing Tomcat - Mac OS X
6 Installing Eclipse - MS Windows
7 Installing Eclipse - Mac OS X
8 Connecting Eclipse to Tomcat
9 JSF Behind the Scenes
10 JSF HelloWorld
11 Creating JSF HTML Forms
12 JSF Forms and Managed Beans
13 Drop-Down Lists - Part 1
14 Drop-Down Lists - Part 2
15 Radio Buttons
16 Check Boxes
17 Prepopulating Forms
18 Recommended JSF Books and Resources

Do You Need More Details?

  • Do you need to connect to a database?
  • Display SQL results in a HTML table?
  • Perform SQL insert, updates and deletes?
I have a premium course that shows you how to complete all of these tasks.
  • Database Integration with JDBC
  • Displaying Data in Lists and Tables
  • Validating HTML Forms
  • Implementing Business Logic with Managed Beans
  • Deploying applications with WAR Files
Read more about the premium course at http://www.luv2code.com/jsf-for-beginners

Follow luv2code with the links below:

– Website: http://www.luv2code.com
– YouTube: http://goo.gl/EV6Kwv
– Twitter: http://goo.gl/ALMzLG
– Facebook: http://goo.gl/8pDRdA

The most popular JSF Tutorial online: http://www.luv2code.com/jsf

Share