aspose file tools*
The moose likes JSF and the fly likes ANNOUNCE:  Metadata based validation for JavaServer Faces – Part 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ANNOUNCE:  Metadata based validation for JavaServer Faces – Part 1" Watch "ANNOUNCE:  Metadata based validation for JavaServer Faces – Part 1" New topic
Author

ANNOUNCE: Metadata based validation for JavaServer Faces – Part 1

Kito Mann
author
Ranch Hand

Joined: Dec 11, 2003
Posts: 113
Hello,

I am pleased to announce a new article on JSF Central. In the first article of this series, Gerhard Petracek introduces MyFaces ExtVal, a JSF-centric validation platform that provides advanced features not yet available in other JSF validation frameworks.


Here is an excerpt:

Validation is an important part of every business application. Therefore JavaServer Faces (JSF) provides a specific phase for it that covers the needs of many web applications. However as time passed, new features and specifications were introduced by the Java Community Process (JCP). One feature that became an important part of Java software development was metadata via annotations. For instance, the Java Persistence API (JPA) uses annotations to simplify development. With annotations, information is attached to the artifact it belongs to. This article illustrates how they can be applied to validation with JSF.

In JSF, you have to define validation logic for every input component to be validated. In several cases this means you must violate the "Don't Repeat Yourself" (DRY) principle. A simple example is a property of an entity that is specified as required in JPA. Even though this information is already available in the model, you also have to specify that the input component bound to the mentioned property is required, by setting the required attribute to true. If the model changes, you have to go though all pages of your JSF application and change the corresponding components. You can resolve such restrictions with MyFaces Extensions Validator framework (aka MyFaces ExtVal).

Read the full article or download the podcast here: Metadata based validation for JavaServer Faces – Part 1

Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3







Kito D. Mann
Author of JSF in Actionwww.JSFCentral.com - JSF FAQ, news, and info
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANNOUNCE: Metadata based validation for JavaServer Faces – Part 1
 
Similar Threads
ANNOUNCE: Designing JSF Applications: a Storyboard Approach — Part 2
Announce: Trinidad in Action - Part 1: An introduction
ANNOUNCE: An Introduction to OpenFaces
ANNOUNCE: Introduction to Spring Faces Part 2