This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes JSF and the fly likes Handling User Input in JSF 2.0 Applications - A Place for Questions & Discussion on the TSS Tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Handling User Input in JSF 2.0 Applications - A Place for Questions & Discussion on the TSS Tutorial" Watch "Handling User Input in JSF 2.0 Applications - A Place for Questions & Discussion on the TSS Tutorial" New topic
Author

Handling User Input in JSF 2.0 Applications - A Place for Questions & Discussion on the TSS Tutorial

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I just published a (corrected URL) video tutorial over at TheServerSide.com, but the new V7 content management system has trouble displaying Java code, so I thought I'd leverage the advanced capabilities of the JavaRanch's code formatting system and give viewers a nice, friendly place they could come to if they wanted to copy and paste some code into their JSF 2.0 development environments.

I also figured if people were having any trouble getting the program to work, they could come here and get some questions answered.

It's a simple and fun to program little Rock-Paper-Scissors application.

Here's the text version of the tutorial if you want to read along. Ignore the ads and focus on the content and you'll be fine: Handling User Input: Text Version of the Tutorial

Here's the coderanch discussion of the first tutorial: Getting Started with JSF Thread

::Shameless Plug:: And here's a link to my book: JSF 2.0 Made Easy






Here is the code and formatted text in the order in which it appears in the tutorial:

The Basic Class


Old School Code Compilation (Yes, we develop our JSF Apps using javac and the JDK in this tutorial.)


Progressively More Complex GameBean


The Higher Algebra of the getResult() Method


The Simple executeGameLogic() Method


The Lame reset() Method (I'm allowed to call it lame. I wrote the darn thing...)


The Complete GameBean.java Class (Without Annotations)


The Complete GameBean.java Class (WITH Annotations)



The Good Old faces-config.xml File (Not Needed)



The Web Page - index.xhtml


And here's how I compiled it:


And here's how I jarred it up:



And here's the generated HTML that gets sent to the client when you hit the application:



Here's the text version of the tutorial if you want to read along. Ignore the ads and focus on the content and you'll be fine: Handling User Input: Text Version of the Tutorial

::Shameless Plug:: And here's a link to my book: JSF 2.0 Made Easy


*Corrected URL: http://jsf.mcnz.com/tutorials/videos.jsp?training=05managedbeansuserinput

CiaranP DEire
Greenhorn

Joined: Nov 06, 2008
Posts: 6
Hi Cameron

The link to the video tutorial you mentioned here doesn't seem to be active anymore - I'm getting a 'page could not be found' error.

Is there an updated address??

Cheers!
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Here's a corrected URL: http://jsf.mcnz.com/tutorials/videos.jsp?training=05managedbeansuserinput

Thanks!
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Ooops...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling User Input in JSF 2.0 Applications - A Place for Questions & Discussion on the TSS Tutorial