Learn how to create and configure your own JSF validator.
- [Instructor] Let's build a custom JSF validator.…It's really straightforward.…We'll implement a validator that will reject…text input that contains the word Select.…We'll supply this validator to the inputTextarea…on our input components listing page.…I've created a standard Java class.…We'll turn this into a validator.…First we add the @FacesValidator annotation.…So, @FacesValidator, let's fix that import.…
The validator comes from…the javax.faces.validator.FacesValidator package.…Adding this validator means we're advertising…to the JSF runtime and this class is a validator…and it should be made available on any Facelets page.…Next we'll implement the Validator Interface…from the javax.faces.validator package.…So, let's implement the validator.…
Let's Fix that import.…We certainly don't want…the one from javax.validation.Validator.…We want javax.faces.validator.Validator.…There we go.…Now, to implement the interfaces abstract methods.…Now, the validate method is what's called…by the JSF runtime to request processing.…
- Why use JSF?
- How JSF works
- Using managed beans in JSF
- Building a JSF page using Facelets
- Using Ajax support in JSF
- Processing complex data with JSF converters
- Security in JSF
- JSF and third-party component libraries
Skill Level Beginner
1. Web Application Development in JavaEE
2. Build Your First JSF Page
3. Use Managed Beans in JSF
4. Build a JSF Page Using Facelets
5. Use Ajax Support in JSF
6. Process Complex Data with JSF Converters
7. Protect Your Application with JSF Validation
8. Security in JSF
9. Combine JSF with Other Frameworks
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.