• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a corrected URL: http://jsf.mcnz.com/tutorials/videos.jsp?training=05managedbeansuserinput

Thanks!
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ooops...
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic