Java%20Server%20Faces - PowerPoint PPT Presentation

About This Presentation
Title:

Java%20Server%20Faces

Description:

http://localhost:8080/Shopping/ http://localhost:8080/MovieCatalog/ http://localhost:8080/Increment. http://localhost:8080/guessNumber. http://localhost:8080/ACoolJSF ... – PowerPoint PPT presentation

Number of Views:136
Avg rating:3.0/5.0
Slides: 13
Provided by: mm77
Category:

less

Transcript and Presenter's Notes

Title: Java%20Server%20Faces


1
Java Server Faces
  • Model/View/Controller Design Pattern for Web
    Development

Slides adapted from Core JavaServer Faces by
Geary and Horstmann and the J2EE Tutorial from
Sun Microsystems
2
Three main parts to JSF
  • A Collection of GUI components
  • An event driven programming model
  • A component model supporting third party
    component development

3
Detailed Features of JSF
  • Bean management
  • Validation model
  • Component library that permits extensions
  • Flexible rendering (not necessarily XHTML)
  • Configurable navigation
  • State management
  • Conversion Model
  • Relies on JSP and Servlet technology
  • Think GUI Building for the web

4
JSF Fundamentals
  • Tags correspond to components in a component tree
  • A request normally goes through several stages of
    processing on the server
  • A built-in FacesServlet handles request
    processing and the JSF life cycle

5
JSF Life Cycle Overview (From the J2EE Tutorial)
6
Restore an old or construct a new component page
(or view)
7
An old view (component tree) has been retrieved
so allow each component in the view to inspect
data values. These values will be redisplayed if
validation or conversion errors are found.
Adds events to an event queue.
8
The submitted values are stored as local
values. If the data is invalid or conversions
are not possible then Render Response is called
directly and the user sees the bad data.
9
Local values are OK and are used to update
the beans.
10
The action method associated with the button or
link that caused the form to be submitted is
executed. The method returns a string for the
navigation handler. The navigation handler uses
the string to determine the next page.
11
The selected page is rendered into a markup
language.
12
Some Really Simple Examples
  • http//localhost8080/Shopping/
  • http//localhost8080/MovieCatalog/
  • http//localhost8080/Increment
  • http//localhost8080/guessNumber
  • http//localhost8080/ACoolJSF
Write a Comment
User Comments (0)
About PowerShow.com