Create and configure your own JSF converters to display and convert custom data.
- [Instructor] Let's try out another incarnation…of the converter, the f:convertDateTime component.…I'll use this to demonstrate another way…you can configure a converter.…To make it interesting, we'll use…our HTML5 component example.…This datetime element is a vanilla HTML5 element…that we integrate into JSF.…See here, it's a standard HTML element.…The value you submit to the page currently…is being saved as a string.…
So, when we do this…at 10:15 p.m.,…let's save the date,…that's what we get currently.…And we go to back in Bean, we see that it is bound to…the dateIn field, which is a string field.…Let's use the datetime converter now…to save it instead as a Date object.…I've gone ahead and added a Date object field…to the HTML5 page Bean.…
Let's change the value binding of the datetime element…to our new Date object.…Use the dateObjectIn.…We'll also change the value binding of the output text…to the same field.…So we want the dateObjectIn.…Now let's configure a datetime converter…using the f:convertDateTime tag.…So, inside our HTML5 element,…
- 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.