JSF Basics

By Daniel Malcolm Viewed: 31775 times Emailed: 244 times Printed: 282 times Bookmark and Share



The JSF specification lists the following ways that JSF helps web-application developers to create user interfaces (UIs):

  • Makes it easy to construct a UI from a set of reusable UI components
  • Simplifies migration of application data to and from the UI
  • Helps manage UI state across server requests
  • Provides a simple model for wiring client-generated events to server-side application
    code
  • Allows custom UI components to be easily built and reused

UI development is easier because UI components are provided as reusable objects. A number of classes, corresponding to UI components, are part of the JSF specification and implementation. Rather than have to worry about the syntax of page layout, you simply drop the UI components into your application. A custom render kit and rendering process convert the components into appropriate page-layout code. The JSF implementation comes with a default render kit for HTML, but the same JSF code can be rendered by other render kits for other client systems. This means that you can use the same JSF code for a variety of client systems, and use different render kits to customize the UI for each client system.

Moving application data to and from the UI is simplified by letting the JSF implementation handle the mechanics of data transfer. You simply specify which data goes where, and the JSF implementation handles the process of moving the data from UI objects to business objects and vice versa. The JSF implementation automatically manages state across user requests, so you do not need to manage or implement any session handling.

Just as it simplifies data handling, JSF provides an easy way to manage event handling. You specify the events of interest and the business objects or classes to handle the events, and the JSF implementation takes care of calling the appropriate methods to handle any events that are generated. The JSF event-handling model is similar to those used in other UI frameworks, such as Java Swing. Specifically, this means that multiple event listeners can respond to a single event.

Finally, because JSF is based on reusable components, it provides a design that allows you to easily create and integrate your own components or third-party components into your JSF-enabled applications. If you are a vendor, JSF allows you to create custom components that can be marketed to developers and page designers.

As with all the enterprise Java technologies, detailed information about the technology can be found in the JSF specification, which can be found at http://java.sun.com/j2ee/javaserverfaces.




Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:


Enter Code:
The Captcha image

Latest Tutorials

[2008-08-13]Struts Vs JSF (A comparison of Struts against JSF)
[2007-10-06]faces-config.xml to DirectTraffic in the JSF Application
[2007-10-06]<convertNumber> and <convertDateTime> in JSF
[2007-10-06]Action listeners in JSF
[2007-10-06]Calling Multiple Listeners in JSF
[2007-09-19]Using Javascript in JSF
[2007-09-19]How to open a new browser window from my JSF page?
[2007-09-19]Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
[2007-09-19]JSF - TreeNode.setID gets IllegalArgument Exception
[2007-09-18]Install and Deploy JBoss Application Server
[2007-09-18]What is JSF (JavaServer Faces)?
[2007-09-18]Differences between JavaServer Faces technology and Struts
[2007-09-18]JSF Basics
[2007-09-18]The Relationship Between JSF and Other Java EE Technologies
[2007-09-18]JSF Life Cycle

More Latest News

Most Viewed Articles (in last 30 days)
Using Javascript in JSF
Action listeners in JSF
Java Bean Scopes in JSF
How to open a new browser window from my JSF page?
Install and Deploy JBoss Application Server
JSF Life Cycle
Installing JSF
Struts Vs JSF (A comparison of Struts against JSF)
What is JSF (JavaServer Faces)?
Calling Multiple Listeners in JSF
<convertNumber> and <convertDateTime> in JSF
faces-config.xml to DirectTraffic in the JSF Application
JSF Basics
Differences between JavaServer Faces technology and Struts
Accessing Context Data in Beans using JSF
Most Emailed Articles (in last 30 days)
JSF Life Cycle
Using Javascript in JSF
How to open a new browser window from my JSF page?
Install and Deploy JBoss Application Server
The Relationship Between JSF and Other Java EE Technologies
<convertNumber> and <convertDateTime> in JSF
Action listeners in JSF
Servlet error : java.lang.IndexOutOfBoundsException (JSF RI 1.1_01: IndexOutOfBoundsException)
JSF Basics
JSF - TreeNode.setID gets IllegalArgument Exception
Installing JSF
faces-config.xml to DirectTraffic in the JSF Application
Java Bean Scopes in JSF
Differences between JavaServer Faces technology and Struts
What is JSF (JavaServer Faces)?