This Pet Catalog app explains a web application that uses JSF 2.0, JPA, GlassFish and MySQL. I took this example GlassFish and MySQL, Part 2: Building a CRUD Web Application With Data Persistence and modified it to use some of the new features JSF 2.0.
Download the sample code
The image below shows the Catalog Listing page, which allows a user to page through a list of items in a store.
JSF 2.0 Facelets XHTML instead of JSP
For JSF 2.0, Facelets XHTML is the preferred way to declare JSF Web Pages. JSP is supported for backwards compatibility, but not all JSF 2.0 features will be available for views using JSP as their page declaration language. JSF 2.0 Facelets has some nice features like templating (similar in functionality to Tiles) and composite components, which I`m not going to discuss here but you can read about that in this article: http://www.ibm.com/developerworks/java/library/j-jsf2fu2/index.html and in this Tech Tip Composite UI Components in JSF 2.0.
The Catalog application`s resources
JSF 2.0 standardizes how to define web resources. Resources are any artifacts that a component may need in order to be rendered properly -- images, CSS, or JavaScript files. With JSF 2.0 you put resources in a resources directory or a subdirectory.
Source:
http://java.dzone.com/articles/jsf-20-jpa-glassfish-and-mysql
Download the sample code
The image below shows the Catalog Listing page, which allows a user to page through a list of items in a store.
JSF 2.0 Facelets XHTML instead of JSP
For JSF 2.0, Facelets XHTML is the preferred way to declare JSF Web Pages. JSP is supported for backwards compatibility, but not all JSF 2.0 features will be available for views using JSP as their page declaration language. JSF 2.0 Facelets has some nice features like templating (similar in functionality to Tiles) and composite components, which I`m not going to discuss here but you can read about that in this article: http://www.ibm.com/developerworks/java/library/j-jsf2fu2/index.html and in this Tech Tip Composite UI Components in JSF 2.0.
The Catalog application`s resources
JSF 2.0 standardizes how to define web resources. Resources are any artifacts that a component may need in order to be rendered properly -- images, CSS, or JavaScript files. With JSF 2.0 you put resources in a resources directory or a subdirectory.
Source:
http://java.dzone.com/articles/jsf-20-jpa-glassfish-and-mysql
Search News
News Categories
What's the News?
Post a link to something interesting from another site, or submit your own original writing for the Java community to read.
Most Popular News
-
How to stand out from other Java/JEE Professionals?
Published about 14-01-2009 | Rated +3 -
10 reasons IT certification will be important in 2009
Published about 05-01-2009 | Rated +2 -
The 9 hottest skills for `09
Published about 02-01-2009 | Rated +1 -
New Features in Servlets 3.0
Published about 05-01-2009 | Rated +4
Most Recent User Submitted News
- "Deploy on Build" using JBoss application server
Published about 19-03-2009 | Rated +1 - What is the return type of the main() method?
Submitted by Balamurali | Rated 0 - JBoss Portlet Bridge Beta 6 Released
Published about 26-01-2009 | Rated +1 - Generic Repository 1.0.0 is released
Published about 13-10-2009 | Rated 0







