Hi Greg,
The demos that come with the spec are probably the best bet for now...
But for what its worth here is a simple example from the book...
Here is the login button. "#{loginPage.login}" is a method binding that binds the button to a method named 'login' that returns a
string and takes no arguments.
here is the
java code...
and then here is the relevant piece of the faces-config.xml file...
if the login method returns 'valid login' the app moves to AccountSummary.jsp, if 'invalid login' then the app returns to Login.jsp.
The login method would then be responsible for doing any business logic. I like to put the logic into other classes (like LoginCommandLocal above) so that the logic can be used across UI's but you get the idea from the code.
If you don't please hassle me!
TTFN,<br /> <br />-bd-<br /> <br /><a href="http://www.amazon.com/exec/obidos/ASIN/0471449156/qid=1064343733/sr=2-1/ref=sr_2_1/002-8375300-3666449" target="_blank" rel="nofollow">Jakarta Pitfalls</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471146153/qid=1064343733/sr=1-2/ref=sr_1_2/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">J2EE AntiPatterns</a> | <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0471462071/qid=1064343733/sr=1-3/ref=sr_1_3/002-8375300-3666449?v=glance&s=books" target="_blank" rel="nofollow">Mastering JavaServer Faces</a> | <a href="http://bill.dudney.net/roller/page/bill" target="_blank" rel="nofollow">Blog</a> | <a href="http://www.jroller.com/page/BillDudney" target="_blank" rel="nofollow">Eclipse Blog</a> | <a href="http://www.sourcebeat.com/TitleAction.do?id=2" target="_blank" rel="nofollow">Eclipse 3 Live</a>