Learn how to finish a JSF page.
- [Instructor] Now, we'll create the sayHello method…that will prepare the greeting.…Let's go over to line 49…and starting at line 50 we'll have a public void…sayHello method that takes no arguments…and it just concatenates…the supplied user name and the word Hello.…So we'll say completedGreeting,…that's the field we created earlier,…is equal to…Hello…comma…concatenated with…the supplied user name, that's…the welcomeUserName.…
Now, let's go back to our XHTML file.…In the index.xhtml, we'll make a small change…here and add the value attribute to our inputText field.…Let's go in there for value,…and then, we're typing the pound sign,…open braces and closed braces,…and then the name we supplied…in the at named annotation.…That's the welcomePageBean and look, NetBeans…has autocompleted that for us.…
welcomePageBean….welcomeUserName.…That's what we'll have in the value attribute.…Next, we'll add a button component.…So, on the next line,…line 13, we'll have an h…command button.…It's value…shall be,…Say…Hello.…And then we set the action attributes on this button…
- 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.