Read without ads and support Scribd by becoming a Scribd Premium Reader.
 
© 2007 Marty Hall
Customized J2EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces, Hibernate, Ajax, GWT, Java 5, Java 6, etc. Ruby/Rails coming soon.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
JSF: ControllingPage Navigation
Originals of Slides and Source Code for Examples:http://www.coreservlets.com/JSF-Tutorial/
© 2007 Marty Hall
Customized J2EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces, Hibernate, Ajax, GWT, Java 5, Java 6, etc. Ruby/Rails coming soon.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
For live JSF training, please see trainingcourses at http://courses.coreservlets.com/.
Taught by the author of 
Core Servlets and JSP 
,
More Servlets and JSP 
, and this tutorial. Available atpublic venues, or customized versions can be heldon-site at yourorganization.
 
Courses developed and taught by Marty Hall
 – Java 5, Java 6, intermediate/beginningservlets/JSP, advanced servlets/JSP, Struts, JSF, Ajax,GWT, custom courses.
Courses developed and taught by coreservlets.com experts (edited by Marty)
 – Spring, Hibernate, EJB3, Ruby/Rails
Contact hall@coreservlets.com for details
 
5
J2EE trainin : htt ://courses.coreservlets.com
Topics in This Chapter
JSF flow of control
The basic steps in using JSF
Static navigation
One result mapping
Dynamic navigation
Multiple result mappings
Accessing the request and responseobjects
Common JSF problems
 
© 2007 Marty Hall
Customized J2EE Training: http://courses.coreservlets.com/ 
Servlets, JSP, Struts, JSF/MyFaces, Hibernate, Ajax, GWT, Java 5, Java 6, etc. Ruby/Rails coming soon.Developed and taught by well-known author and developer. At public venues or onsite at
 your 
location.
Static Navigation
 
7
J2EE trainin : htt ://courses.coreservlets.com
JSF Flow of Control(Highly Simplified)
Blah.jsp
  G  E   T   r  e  q   u  e  s  t   B  l  a  h.  f  a  c  e  s
submit formPOST request Blah.faces
InstantiateBean
returncondition
ChooseJSPRun ActionController Method
forward
result1.jspresult2.jsp...result
.jsp
 f   
Bypass Java code. Formspecifies return condition.
faces-config.xml
-beans declared in managed-bean section-mapping of return conditionsdeclared in navigation-rule section
BusinessLogic
results
 
8
J2EE training: http://courses.coreservlets.com
JSF Flow of Control (Simplified)
A form is displayed
Form uses f:view and h:form
The form is submitted to itself
Original URL and
ACTION
URL are http://…/ 
blah
.faces
A bean is instantiated
Listed in the managed-bean section of faces-config.xml
The action controller method is invoked
Listed in the action attribute of h:commandButton
The action method returns a condition
A string that matches from-outcome in the navigationrules in faces-config.xml
In this example, static condition is specified in form
A results page is displayed
The page is specified by to-view-id in the navigationrules in faces-config.xml
Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • Notes
    Load more