Java
  Home arrow Java arrow Page 6 - Introduction to JavaServer Faces, Part 3
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Introduction to JavaServer Faces, Part 3
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 20
    2004-03-22


    Table of Contents:
  • Introduction to JavaServer Faces, Part 3
  • Wrtiting the JSP Files for the Page Navigation Example
  • Creating the Application Configuration File for the Page Navigation Example
  • Compiling and Running the Page Navigation Example
  • Introducing the JSF Application Programming Interface (API)
  • javax Packages
  • More javax Packages

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Introduction to JavaServer Faces, Part 3 - javax Packages
    ( Page 6 of 7 )

    The javax.faces.convert Package
    Data conversion happens naturally during the request processing lifecycle. User input, always in String form, is converted into corresponding formats such as numeric and date formats. The javax.faces.convert package contains one interface (Converter) and one Exception class (ConverterException). You use the Converter interface if you want to write a custom converter, and the ConverterException is thrown for each failed data conversion. Converters are discussed in detail in Chapter 10.

    The javax.faces.el Package
    The javax.faces.el package contains classes that are useful in evaluating and processing expressions encountered in JSP pages in a JSF application. The el stands for expression language. One of the classes you may want to get familiar with is ValueBinding. This class is used for accessing the property represented by an action or value reference expression.

    The javax.faces.event Package
    The javax.faces.event package contains classes and interfaces useful for event processing. The FacesEvent class, for example, extends the java.util.EventObject class and is the base class for any event that can be emitted in a JSF application. This class has two subclasses that are also members of the javax.faces.event package: ActionEvent and ValueChangedEvent. These are the only events that can be fired in a JSF application. ActionEvent represents the activation of a UI component, such as the clicking of a button. ValueChangedEvent is trigged when the local value of a component has been changed.

    The javax.faces.event package also provides three interfaces: FacesListener, ActionListener, and ValueChangedListener. The FacesListener interface is the base interface that must be implemented by any event listener in JSF. The FacesListener interface is also the superinterface of the ActionListener and ValueChangedListener. You implement the ActionListener interface to write a listener that can receive ActionEvents. Implement the ValueChangedListener interface if you want to receive ValueChangedEvents.

    Another member of the javax.faces.event package is the PhaseId class. This class encapsulates type-safe enumeration of possible values used to indicate after which phase in the request processing lifecycle an event listener will be executed. The FacesListener interface has the getPhaseId method, which returns a PhaseId. The request processing lifecycle calls the getPhaseId method of all registered listeners to find out when to execute the listener. If a listener’s getPhaseId returns PhaseId.APPLY_REQUEST_VALUES, for example, the listener will be executed in the process event step after the Apply Request Values phase.

    The AbortProcessingException class in the javax.faces.event package may be thrown by event listeners to terminate the processing of the current event.

    Buy this book now!Remember: This is part three of the second chapter of JavaServer Faces Programming, by Budi Kurniawan (McGraw-Hill/Osborne, ISBN 0-07-222983). If you've enjoyed what you've seen here, click on the "Buy it now!" banner to pick up a copy today!
    Buy this book!



     
     
    >>> More Java Articles          >>> More By McGraw-Hill/Osborne
     

       

    JAVA ARTICLES

    - Exception Handling Techniques in Java
    - More About Multithreading in Java
    - The Basics of Multiple Threads in Java
    - Data Access Using Spring Framework JDBC
    - New Object Initialization in Java
    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT