0% found this document useful (0 votes)
33 views

Made By: Varun Gupta, Komal Latam and Rohit Samant From T.Y.Bsc. (It)

This document provides an overview of JavaServer Faces (JSF) technology. JSF is a server-side user interface framework for building web applications using reusable UI components. The key aspects covered include the JSF architecture with UI components, backing beans, and pages; the benefits of separation of concerns and a rich component model; what a basic JSF application contains; and the JSF request processing lifecycle in 6 phases from restoring the view to rendering the response.

Uploaded by

Varun Gupta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Made By: Varun Gupta, Komal Latam and Rohit Samant From T.Y.Bsc. (It)

This document provides an overview of JavaServer Faces (JSF) technology. JSF is a server-side user interface framework for building web applications using reusable UI components. The key aspects covered include the JSF architecture with UI components, backing beans, and pages; the benefits of separation of concerns and a rich component model; what a basic JSF application contains; and the JSF request processing lifecycle in 6 phases from restoring the view to rendering the response.

Uploaded by

Varun Gupta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Made by

Varun Gupta, Komal Latam and Rohit Samant from T.Y.BSc.(IT)

Introduction

JavaServer Faces technology is a server-side user interface component framework for Java technologybased web applications. The main components of JavaServer Faces technology are as follows:

An API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features Two Java Server Pages (JSP) custom tag libraries for expressing UI components within a JSP page and for wiring components to server-side objects

JavaServer Faces Technology User Interface

The user interface created with JavaServer Faces technology (represented by myUI in the graphic) runs on the server and renders back to the client.

The JSP page, myform.jsp is a JavaServer Faces Page, which is a JSP page, that includes JavaServer Face Tags.

JavaServer Faces Technology User Interface continued..

The UI for the web application (represented by myUI in the figure) manages the objects referenced by the JSP page. The components are:

The UI component objects that map to the tags on the JSP page Any event listeners, validators, and converters that are registered on the components The JavaBeans components that encapsulate the data and application-specific functionality of the components

Benefits of JavaServer Faces

It offers a clean separation between behavior and presentation. Allows each member of a web application development team to focus on his/her piece of development process. Thereby, provides simple programming model to link pieces. Leverages familiar UI component and web-tier concepts without limiting us to particular scripting technology or markup language. Provides rich architecture for managing component state, processing component data, validating user input, and handling events.

What is a JavaServer Faces Application?


Its just like any other Java web application. A typical JSF application includes following pieces:

A set of JSP pages A set of backing beans, which are JavaBeans components that define properties and functions for UI components on a page An application configuration resource file, which defines page navigation rules and configures beans and other custom objects, such as custom components A deployment descriptor (a web.xml file) Possibly a set of custom objects created by the application developer. These objects might include custom components, validators, converters, or listeners. A set of custom tags for representing custom objects on the page

JSF Lifecycle

JSF Lifecycle continued

Phase 1: Restore View


This phase starts when a user requests a JSF page by clicking a link, button etc. In this phase view generation of the page, binding of components to its event handlers and validations are performed and view is saved in the Faces Context object. The purpose of this phase is for each component to retrieve its current state.

Phase 2: Apply Request Value

Phase 3: Process Validations

During this phase local values stored for the component in the tree are compared to the validation rules registered for the components.

JSF Lifecycle continued

Phase 4: Update Model Values

After confirming that data is valid in the previous phase local values of components can be set to corresponding server side object properties i.e. backing beans. Before this phase the component values have been converted, validated, and applied to the bean objects, so you can now use them to execute the application's business logic. In this phase JSP container renders the page back to the user, if jsp is used by application i.e. view is displayed with all of its components in their current state

Phase 5: Invoke Application

Phase 6: Render Response

Thank You

You might also like