Read without ads and support Scribd by becoming a Scribd Premium Reader.
 
JSF 1.2 Study Notes
 byIvan A Krizsan
Version: May 16, 2008Copyright 2008 Ivan A Krizsan. All Rights Reserved.1
 
Table of Contents
Table of Contents..................................................................................................................................2Purpose ................................................................................................................................................5Licensing .............................................................................................................................................5Disclaimers ..........................................................................................................................................5Environment.........................................................................................................................................5What is JSF?.........................................................................................................................................6Extendibility.........................................................................................................................................6Custom User-Interface Widgets.......................................................................................................6Custom Display Technologies.........................................................................................................6JSF and MVC.......................................................................................................................................7Parts of JSF...........................................................................................................................................8User Interface Components.............................................................................................................8JSF HTML Tags........................................................................................................................10Facets.........................................................................................................................................11JSF Core Tags............................................................................................................................13The <f:verbatim> Tag...........................................................................................................14Managed Beans and Backing Beans..............................................................................................15Implementation.........................................................................................................................16Configuration............................................................................................................................17Use.............................................................................................................................................17Initialization..............................................................................................................................18Managed Lists and Maps..........................................................................................................18Managed Bean Properties.........................................................................................................20Validators.......................................................................................................................................22Validator Classes.......................................................................................................................22Validator Methods.....................................................................................................................24Messages........................................................................................................................................25Converters......................................................................................................................................27Attaching Converters................................................................................................................28Converter Tags..........................................................................................................................29Converter Classes......................................................................................................................30Converter Messages..................................................................................................................31Renderers.......................................................................................................................................32Events and Listeners......................................................................................................................33Action Events............................................................................................................................33The actionListener Attribute.................................................................................................33The <f:actionListener> Tag..................................................................................................34The <f:setPropertyActionListener> Tag...............................................................................35Invocation Order...................................................................................................................35Application Actions...................................................................................................................36Value Change Events.................................................................................................................37The valueChangeListener Attribute......................................................................................37The <f:valueChangeListener> Tag.......................................................................................37Phase Events..............................................................................................................................38Phase Listener.......................................................................................................................38Registering a Phase Listener................................................................................................38Request Processing Life Cycle...........................................................................................................39Restore View..................................................................................................................................412
 
Apply Request Values....................................................................................................................42Process Validations........................................................................................................................43Update Model Values.....................................................................................................................44Invoke Application.........................................................................................................................44Render Response............................................................................................................................45 Navigation..........................................................................................................................................46Localization and Internationalization.................................................................................................48Resource Bundles..........................................................................................................................49Accessing Resource Bundles.........................................................................................................50Configuring Supported Locales.....................................................................................................50Retrieving the Message..................................................................................................................51Controlling the Locale...................................................................................................................51Browser's Current Locale..........................................................................................................51JSF's Current Locale.................................................................................................................51Retrieving Locale Configuration...............................................................................................52Core Tags and User Interface Components in Detail.........................................................................53Attributes and Custom Attributes..................................................................................................53Making Selections..........................................................................................................................55Single Checkboxes....................................................................................................................55Selecting from a List.................................................................................................................55Hardcoded List Items...........................................................................................................55Fallback List Items...............................................................................................................56Multiple Items......................................................................................................................57Grouping Multiple Items......................................................................................................58Glossary.........................................................................................................................................59Appendix 1 – Events and Request Processing Life Cycle Sample Program......................................61Web Page.......................................................................................................................................61Managed Bean Class......................................................................................................................62JSF Configuration File...................................................................................................................64Web Application Deployment Descriptor......................................................................................64Analysis.........................................................................................................................................65Earlier Validation.......................................................................................................................67Skipping Phases........................................................................................................................69Bailing Out................................................................................................................................71Appendix 2 – UI Component Tree Navigation...................................................................................73Web Page.......................................................................................................................................73Managed Bean Class......................................................................................................................75JSF Configuration File...................................................................................................................77Web Application Deployment Descriptor......................................................................................77Analysis.........................................................................................................................................78Appendix 3 – Navigation Sample Program........................................................................................81 Navigation Schema........................................................................................................................81Java Script......................................................................................................................................82Web Pages......................................................................................................................................82cancelled.jspx............................................................................................................................82completed.jspx..........................................................................................................................83input_address.jspx.....................................................................................................................84input_firstname.jspx..................................................................................................................85input_lastname.jspx...................................................................................................................86introduction.jspx........................................................................................................................873
Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • Notes
    Load more