Handling and responding to user input is the focus of this video tutorial. It takes you through the process of creating a simple xhtml page that leverages a @ManagedBean decorated POJO in order to handle user input, respond to a form submission, and dynamically display content back to the user. It's a powerful example, but you'll also find that the amount of code to get the application working is quite minimal.
Rock Paper Scissors Anyone?
The application prototypes a little Rock-Paper-Scissors game which makes the problem you're trying to solve easy to understand, and to a certain extent, fun to code. Here's what the finished application looks like:
This tutorial picks up from where the previous tutorial left off, although you can jump right into this tutorial if you have a basic JSF 2.0 development environment working and configured, as this tutorial doesn't actually 'build off' of the previous one.
If you are following along and would like to copy the code, as opposed to laboriously typing it out by hand, you can find all of the code snippets, in the order in which they appear in the tutorial, displayed at the coderanch. It's also a great place to ask a question or two if you're running into any problems. The complete text of the tutorial is also available.
Handling of User Input with JSF 2.0 and ManagedBeans
Configuring a JavaServer Faces 2.0 Dev Environment
*******************
Catch Cameron McKenzie & Max Katz (of RichFaces Fame) at TSSJS 2011 in Las Vegas (March 16th-18th)
Oh, and by the way, Cameron McKenzie will be presenting a session at TheServerSide Java Symposium on what's new and exciting with JPA 2.0. He'll also be loitering around the various sessions being delivered by Max Katz, author of Practical RichFaces, as Mr. Katz discusses what's new with RichFaces 4.0.
Register for TheServerSide Java Symposium 2011
