Java webinar -_jsf_v2[1]

314 views
245 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
314
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Applying Project Management #T29231 Java Webinar Series - Java Server Faces (JSF) Slide Duration Purpose Key Message(s) Additional Information Possible Response(s) to Discussion Question(s) Reference(s) Transition to Next Slide
  • The Centra tools displayed on this slide are the tools you can use to interact with the participants during this session. The RAISE YOUR HAND icon is used to ask questions or make comments. Once a participant “raises their hand”, the presenter or moderator will then call on them to speak. In order to speak, you must be given a microphone. Once the microphone is granted, you can speak by holding down the control key on your keyboard. Go ahead and click this icon now. The YES/NO icons are used to answer simple yes/no or true/false questions. Please go ahead and click these icons now. Feel free to indicate APPLAUSE or LAUGHTER during the session by choosing the applicable icons. “ The CHAT icon is an important icon. It will be used to communicate with the participants as well as the presenters. Please click on it now and resize it and move to the right side of the screen to see the Centra presentation and the chat room at the same time. There are several options on how to send your Text Chat message. We will focus on selecting “ALL” in the dropdown list. “All” is an open public forum where all messages will be displayed to both participants and presenters. Please enter your location today. [Pause: wait for participants to type messages into the chat room.] “ If you experience volume issues, you can use the Centra Volume Control. We recommend setting the bar to mid point or less for optimal audio.” “ There is also a Network Connectivity Bar at the lower right hand side of your screen. Since Centra is a real-time stream over the network, it is impacted by your network connection. This bar indicates the quality of your network connection. To ensure the best experience possible, please review the listed Audio/Connectivity Tips.
  • You have two options today to ask questions. To ask questions live and speak via VOIP you should Press the Raise Hand icon to get the faculty’s attention. Once called up, you would hold down the Talk icon or the CTRL key and then release when done. Or you can post your question into the Text Chat at any time.
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • Applying Project Management #T29231
  • “ Thank you very much for your participation in the session today. I’d also like to thank our presenters for their time and expertise.” “ When you log out you’ll be taken to a session evaluation – please take a few minutes to fill it out. Your feedback is appreciated. Thanks again for joining us. Have a good day.”
  • Applying Project Management #T29231
  • Java webinar -_jsf_v2[1]

    1. 1. Java Webinar Series Java Server Faces (JSF)Accenture Confidential
    2. 2. Centra Tools Raise Hand Audio/Connectivity Tips • Run the Audio Wizard Yes / No • Choose Tools/Audio Wizard from the menu at top of screen Applause • Close all network based applications • Outlook, MSN/AOL, other websites, Office Communicator, etc Laugh • Connect via an Accenture LAN or high speed internet connection • If using a wireless connection, ensure Text Chat your signal is as strong as possible • Monitor the Network Connectivity Centra Volume Control Bar • Contact Learning Product Support if issues continue Network Connectivity BarAccenture Confidential
    3. 3. Asking Questions Two Options: 1. Ask live questions during the designated Q&A sessions: • Press Raise Hand icon to get faculty’s attention • Once called upon, there are two options to speak: - Click the Talk button or - Press the Ctrl key When done speaking, unselect the Talk button or release the Ctrl Key. 2. Post questions at any time in the chat room.Accenture Confidential
    4. 4. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 4
    5. 5. Definition • Java Servers Faces (JSF) is a framework used to build user interfaces for Java web applications • Model View Controller (MVC) is an architectural pattern that isolates business logic from user interface, effectively enabling a developer to modify either the visual appearance of the application or the underlying business rules without affecting the other.Accenture Confidential 5
    6. 6. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 6
    7. 7. Introduction to JSF JSF simplifies Web development  Provides a component-based way of developing web user interfaces.Accenture Confidential 7
    8. 8. Introduction to JSF JSF simplifies Web development  Provides a component-based way of developing web user interfaces.  It can build user interfaces for Java web applications by assembling components in a page and binding it to an application data.Accenture Confidential 8
    9. 9. Introduction to JSF • JSF is event driven.  Component can be embedded in a JSP using the tags defined by JSF technology and use the framework to handle navigation from one page to another.Accenture Confidential 9
    10. 10. Introduction to JSF • JSF offers a robust, "best of breed" framework with well- established development patterns  It is built to answer several problems of many pre-existing Java web development frameworks.Accenture Confidential 10
    11. 11. Introduction to JSF • JSF was created to be more effective and efficient in building dynamic web user interfaces that are based on a well-designed and maintainable architecture.Accenture Confidential 11
    12. 12. JSF Components CGI CGI allows a Web page to invoke a server-side process to generate an output dynamically.Accenture Confidential 12
    13. 13. JSF Components CGI Servlet The Java Servlet API enabled developers to write server- side code for delivering dynamic web content as opposed to only using Java applets as was previously done in Java.Accenture Confidential 13
    14. 14. JSF Components CGI Servlet JSP JSP provided a simpler page-based solution to generating large amounts of dynamic HTML content for web user interfaces.Accenture Confidential 14
    15. 15. JSF Components CGI Servlet JSP Struts One of the key reasons for Struts popularity is that it elegantly solved the problem of separation of code between the user-interface and server-side code by embracing the Model-View-Controller (MVC) design paradigm.Accenture Confidential 15
    16. 16. JSF Components CGI Servlet JSP Struts JSF Java Server Faces solves the problem of the View tier, without inventing new Java EE infrastructures. At its core, JSF combines an MVC design approach with a powerful, component-based UI development framework that greatly simplifies Java EE web development while using existing JSP and servlet technologies.Accenture Confidential 16
    17. 17. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 17
    18. 18. JSF Life Cycle What is JSF Life Cycle? • The life cycle of a Java Server Faces page is similar to that of a JSP page: the client makes an HTTP request for the page, and the server responds with the page translated to HTML.Accenture Confidential 18
    19. 19. JSF Life Cycle What is JSF Life Cycle? • The life cycle of a Java Server Faces page is similar to that of a JSP page: the client makes an HTTP request for the page, and the server responds with the page translated to HTML. • Life cycle of a JSF web application starts when user makes a request.Accenture Confidential 19
    20. 20. JSF Life Cycle What is JSF Life Cycle? • The life cycle of a Java Server Faces page is similar to that of a JSP page: the client makes an HTTP request for the page, and the server responds with the page translated to HTML. • Life cycle of a JSF web application starts when user makes a request. • Once the page is submitted various further tasks are performed. Some of these are: • Validation of data provided in components in the view. • Data conversion according to types specified on server side, etc.Accenture Confidential 20
    21. 21. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 21
    22. 22. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 22
    23. 23. JSF Life Cycle Restore View • The first phase of the JSF lifecycle. • Controller examines the request and the view id, which is determined by the name of the JSP page. If the view does not exist, the controller creates it. • The view contains all the GUI components.Accenture Confidential 23
    24. 24. JSF Life Cycle Restore View • This phase of the lifecycle presents three view instances:  new view  initial view  postbackAccenture Confidential 24
    25. 25. JSF Life Cycle Restore View  New View • JSF builds the view of the Faces page and wires the event handlers and validators to the components. • The view is saved in the FacesContext object.Accenture Confidential 25
    26. 26. JSF Life Cycle Restore View • Initial View • User is requesting the page for the first time. • Life cycle only executes the restore view and render response phases because there is no user input or no actions to process.Accenture Confidential 26
    27. 27. JSF Life Cycle Restore View • Postback • User submits the form contained on a page that was previously loaded into the browser as a result of executing an initial request • Life cycle executes all of the phases.Accenture Confidential 27
    28. 28. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 28
    29. 29. JSF Life Cycle Apply Request Values • The purpose of this phase is for each component to retrieve its current state. • Each component in the tree extracts its new value from the request parameters by using its decode method. • If a component has its immediate attribute set to TRUE, then the validation, conversion, and events associated with the component are processed during this phase.Accenture Confidential 29
    30. 30. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 30
    31. 31. JSF Life Cycle Process Validations • The first event handling of the lifecycle happens in this phase. • Each component will have its values validated against the application’s validation rules. • If an entered value is invalid the error message is added in the FacesContext and the JSF advances to the Render Response Phase.Accenture Confidential 31
    32. 32. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 32
    33. 33. JSF Life Cycle Update Model Values • This phase updates the actual values of the server side model by updating the properties of the backing bean. • Only bean properties bound to a component’s value will be updated.Accenture Confidential 33
    34. 34. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values were Application updated from beans RESPONSE Render Response prerender()Accenture Confidential 34
    35. 35. JSF Life Cycle Invoke Application • JSF controller invokes the application to handle the Form submissions. • The component values will be converted, validated and applied to the model objects. • Developer can also specify the next logical view for a given sequence.Accenture Confidential 35
    36. 36. JSF Life Cycle REQUEST init() component tree retrieved submitted form values stored in component Restore component values converted View preprocess() component values calculated Apply Request _validate() Values _processValueChange() component values bound to Process backing beans property Validations events handled Update methods invoked Validation / Conversion Model navigation calculated ERROR Exist Values Component Invoke values updated Application from beans RESPONSE Render Response prerender()Accenture Confidential 36
    37. 37. JSF Life Cycle Render Response • The page displays the view with all of its components in their current state.Accenture Confidential 37
    38. 38. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 38
    39. 39. JSF Components User Interface Components • In JSF, the term UI component technically refers to a specific UI component class that defines the core behavior of the component regardless of how it appears to the client. • The term is more generally used to describe the entire set of moving parts that include both the core UI component class and other related helper components.Accenture Confidential 39
    40. 40. JSF ComponentsAccenture Confidential 40
    41. 41. JSF Components JSF UI Components  Page components • Navigation components • Input components • Output components • Panel components • Data Viewing componentsAccenture Confidential 41
    42. 42. JSF Components Page Components • Page Components are used to mark a JSF page with the major HTML structuring elements corresponding roughly to the HTML, BODY and FORM tags.Accenture Confidential 42
    43. 43. JSF Components Page Components • Page Components are used to mark a JSF page with the major HTML structuring elements corresponding roughly to the HTML, BODY and FORM tags. • Frequently used Page Components: o Form o View o SubviewAccenture Confidential 43
    44. 44. JSF Components Page Components • Page Components are used to mark a JSF page with the major HTML structuring elements corresponding roughly to the HTML, BODY and FORM tags. • Frequently Used Page Components: o Form o View o Subview • Other Page Components: o Script Collector o FragmentAccenture Confidential 44
    45. 45. JSF Components Page Components  Form  Creates a main container for the other components.Accenture Confidential 45
    46. 46. JSF Components Page Components  Form  Creates a main container for the other components.  View  The outermost JSF container object. It is the equivalent of a page where all other JSF tags must be inside a view.Accenture Confidential 46
    47. 47. JSF Components Page Components  Form  Creates a main container for the other components.  View  The outermost JSF container object. It is the equivalent of a page where all other JSF tags must be inside a view.  Subview  Primarily used to introduce a new naming context to ensure that component IDs have unique namesAccenture Confidential 47
    48. 48. JSF Components JSF UI Components  Page components  Navigation components • Input components • Output components • Panel components • Data Viewing componentsAccenture Confidential 48
    49. 49. JSF Components Navigation Components • Navigation Component passes an “action” to the server where the action is “caught” by an action handler.Accenture Confidential 49
    50. 50. JSF Components Navigation Components • Navigation Component passes an “action” to the server where the action is “caught” by an action handler. • After manipulation by the handler, the action is then evaluated against a set of navigation rules to determine which page is displayed next in the browser.Accenture Confidential 50
    51. 51. JSF Components Navigation Components • Frequently Used Navigation Components o Command Button o Hyperlink o ImageLinkAccenture Confidential 51
    52. 52. JSF Components Navigation Components • Frequently Used Navigation Components o Command Button o Hyperlink o ImageLink • Other Navigation Components: o Menu Bar o Link Request o Request Row Action o Command Row ActionAccenture Confidential 52
    53. 53. JSF Components Navigation Components  Command Button  This component creates a push button that has either a text label or an image. The button can be used to submit or reset a form.  It can also be programmed to perform a server-side or client-side action or to navigate to another page.Accenture Confidential 53
    54. 54. JSF Components Navigation Components  Hyperlink  Creates a hyperlink on the page. It can be used to navigate to other pages or programmed to perform a client-side or server-side action.Accenture Confidential 54
    55. 55. JSF Components Navigation Components  Command Row Action  This component enables all the rows in a data table to perform an action.  Clicking a row in a data table submits the containing form and, if successful, returns the page defined by the action associated. It can be used to navigate to other pages or programmed to perform a client-side or server-side action.Accenture Confidential 55
    56. 56. JSF Components JSF UI Components  Page components  Navigation components  Input components • Output components • Panel components • Data Viewing componentsAccenture Confidential 56
    57. 57. JSF Components Input Components • Input Components are used to interact with a user and submit the results of the interaction back to the server for processing.Accenture Confidential 57
    58. 58. JSF Components Input Components • Frequently Used Input Components o Input Text o Input Text Area o Input Password o File Upload o Select Calendar o Check Box o Radio Button o Combo BoxAccenture Confidential 58
    59. 59. JSF Components Input Components • Other Input Components: o Input – Rich Text Area o Helper – DatePicker o Helper – Slider o Helper – Spinner o Input – Hidden o CheckBox Group o Select Color o List Box – Multiple Select o List Box – Single SelectAccenture Confidential 59
    60. 60. JSF Components Input Components  Text Field  Lets you create an input field for the following types of data: String, Number, Date/Time, and Mask.Accenture Confidential 60
    61. 61. JSF Components Input Components  Text Field  Lets you create an input field for the following types of data: String, Number, Date/Time, and Mask.  Text Area  This allows a user to enter multiple lines of text.Accenture Confidential 61
    62. 62. JSF Components Input Components  Text Field  Lets you create an input field for the following types of data: String, Number, Date/Time, and Mask.  Text Area  This allows a user to enter multiple lines of text.  Password Field  Creates an input field where entered text is obscured from the user.Accenture Confidential 62
    63. 63. JSF Components JSF UI Components  Page components  Navigation components  Input components  Output components • Panel components • Data Viewing componentsAccenture Confidential 63
    64. 64. JSF Components Output Components • Output Components are used to interact with a user and displays the result of the interaction.Accenture Confidential 64
    65. 65. JSF Components Output Components • Output Components are used to interact with a user and displays the result of the interaction. • Output Components o Image o Message o Label o Progress Bar o Output Text o Media PlayerAccenture Confidential 65
    66. 66. JSF Components Output Components  Image  Displays a graphic (usually a GIF or JPEG file). It can use a local or remote image file.Accenture Confidential 66
    67. 67. JSF Components Output Components  Image  Displays a graphic (usually a GIF or JPEG file). It can use a local or remote image file.  Message  Displays an error message that was generated by the server when the page was submitted. This component is typically bound to other input components.Accenture Confidential 67
    68. 68. JSF Components Output Components  Image  Displays a graphic (usually a GIF or JPEG file). It can use a local or remote image file.  Message  Displays an error message that was generated by the server when the page was submitted. This component is typically bound to other input components.  Label  Inserts an accessibility output label.Accenture Confidential 68
    69. 69. JSF Components JSF UI Components  Page components  Navigation components  Input components  Output components  Panel components • Data Viewing componentsAccenture Confidential 69
    70. 70. JSF Components Panel Components • Container of a collection of UI components. This is much like the HTML table and div tags.Accenture Confidential 70
    71. 71. JSF Components Panel Components • Container of a collection of UI components. This is much like the HTML table and div tags. • Panel Components o Dialog o Layout o Grid o Box o GroupAccenture Confidential 71
    72. 72. JSF Components Panel Components  Grid Panel  It aligns all components into a table with a specified number of rows and columns.Accenture Confidential 72
    73. 73. JSF Components Panel Components  Grid Panel  It aligns all components into a table with a specified number of rows and columns.  Dialog Panel  Creates a dialog box where the panel is rendered above/in front of the main panel.Accenture Confidential 73
    74. 74. JSF Components JSF UI Components  Page components  Navigation components  Input components  Output components  Panel components  Data Viewing componentsAccenture Confidential 74
    75. 75. JSF Components Data Viewing Components • Data Viewing Components are components used to display iterative values or values in an array, often retrieved from data storage. • Frequently Used Data Viewing Component o Data TableAccenture Confidential 75
    76. 76. JSF Components Data Viewing Components  Data Table  Allows you to create a table of data that are represented in an array or list.Accenture Confidential 76
    77. 77. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 77
    78. 78. Definition • Presentation data – These are the data entered by the end user and/or the data displayed to the end user. • Model data – These are the data manipulated in the backing bean.Accenture Confidential 78
    79. 79. Form Processing Form processing is the collection, manipulation and rendering of data from a form.Accenture Confidential 79
    80. 80. Form Processing  Converters • Validators • Event Handling • Error HandlingAccenture Confidential 80
    81. 81. Conversion Presentation data is always represented as String in default. A converter is an object that performs object-to-string and string-to-object conversions between presentation and model data. This is important because the backing bean can store data of different types like java.lang.Integer, java.util.Date, among others. Conversion is necessary to be able to manipulate the data as it is intended.Accenture Confidential 81
    82. 82. Conversion: Standard Converters Below are the standard built-in converters Class Description javax.faces.convert.DateTimeConverter Converter for java.util.Date objects. Converter for java.lang.Number javax.faces.convert.NumberConverter objects. Converter for java.math.BigDecimal javax.faces.convert.BigDecimalConverter objects. Converter for java.math.BigInteger javax.faces.convert.BigIntegerConverter objects. Converter for java.lang.Boolean objects javax.faces.convert.BooleanConverter and the primitive boolean data type. Converter for java.lang.Byte objects javax.faces.convert.ByteConverter and the primitive byte data type.Accenture Confidential 82
    83. 83. Conversion: Standard Converters Class Description javax.faces.convert.CharacterConverter Converter for java.lang.Character objects and the primitive char data type. javax.faces.convert.DoubleConverter Converter for java.lang.Double objects and the primitive double data type. javax.faces.convert.FloatConverter Converter for java.lang.Float objects and the primitive float data type. javax.faces.convert.IntegerConverter Converter for java.lang.Integer objects and the primitive int data type. javax.faces.convert.LongConverter Converter for java.lang.Long objects and the primitive long data type. javax.faces.convert.ShortConverter Converter for java.lang.Short objects and the primitive short data type.Accenture Confidential 83
    84. 84. Conversion: Custom Converters Converters may be created and customized. This is helpful when a project has a data type or value object that is application specific.Accenture Confidential 84
    85. 85. Form Processing  Converters  Validators • Event Handling • Error HandlingAccenture Confidential 85
    86. 86. Validation Values from the end users may be validated to ensure that the data retrieved conforms to the application requirements. This way, it is guaranteed that the program will not throw exceptions due to incorrect arguments when the data is manipulated.Accenture Confidential 86
    87. 87. Validation: Custom Validators Same as converters, validators may be created and customized. This is helpful when a project has a specific validation requirement that the standard validators cannot handle.Accenture Confidential 87
    88. 88. Form Processing  Converters  Validators  Event Handling • Error HandlingAccenture Confidential 88
    89. 89. Event Handling • Events may trigger a change in the user interface or invoke backend application code, or both. • Below are the types of events supported by JSF.  Value Change event — when the local value of an input component has changed  Action event — when a command component is activated  Client-side event — implemented using browser scripting languagesAccenture Confidential 89
    90. 90. Event Handling Value Change Event • A Value Change event is triggered by a change in the value of a component, such as text modification in a text field or a check box selection. • It is usually processed at the completion of the Process Validations phase. When the immediate flag is true, it is processed at the end of the Apply Request Values phase.Accenture Confidential 90
    91. 91. Event Handling Action Event • An Action event may be triggered by a click on a button or a link. • Navigation is done in the Action event. • The Action event is usually processed at the completion of the Invoke Application phase. When the immediate flag is true, it is processed at the end of the Apply Request Values phase.Accenture Confidential 91
    92. 92. Event Handling Client-side Event • Client-side event handlers are where actions may be defined for specific events using JavaScript. These events are processed first before any requests are made.Accenture Confidential 92
    93. 93. Event Handling Client-side Event • Client-side event handlers are where actions may be defined for specific events using JavaScript. These events are processed first before any requests are made. • The following are the available events to be handled: • onBlur • onKeyUp • onClick • onMouseDown • onDblClick • onMouseMove • onFocus • onMouseOut • onKeyDown • onMouseOver • onKeyPress • onMouseUpAccenture Confidential 93
    94. 94. Form Processing  Converters  Validators  Event Handling  Error HandlingAccenture Confidential 94
    95. 95. Error Handling • Developers are used to seeing Java stack traces. It is a common part of development. However, the information in a stack trace is meaningless to an end-user of an application, except to indicate that their requests did not work. • It is important that developers respond to exceptions and errors in their Java application in a meaningful way and provide users with messages they can understand.Accenture Confidential 95
    96. 96. Error Handling Possible errors that can be handled by JSF: • Validation Errors • An error generated based on a validation rule of an application.Accenture Confidential 96
    97. 97. Error Handling Possible errors that can be handled by JSF: • Validation Errors • An error generated based on a validation rule of an application. • Checked Exceptions • Represents invalid conditions beyond the immediate control of the Java application, such as invalid user input, database access errors, network problems, or missing files.Accenture Confidential 97
    98. 98. Error Handling Possible errors that can be handled by JSF: • Unchecked Exceptions • Exceptions representing errors in the program, such as invalid arguments, division by zero, or mistakenly accessing an object bound to a variable that is null.Accenture Confidential 98
    99. 99. Error Handling Possible errors that can be handled by JSF: • Unchecked Exceptions • Exceptions representing errors in the program, such as invalid arguments, division by zero, or mistakenly accessing an object bound to a variable that is null. • Exceptions resulting from HTML status code • These are used by the HTTP to indicate the status of a web request.Accenture Confidential 99
    100. 100. Topics • Introduction • JSF Life Cycle • JSF Components • Form Processing • Advantages and Benefits of using JSFAccenture Confidential 100
    101. 101. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.Accenture Confidential 101
    102. 102. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.  JSF provides a set of associated custom tags to create forms with complex interfaces.Accenture Confidential 102
    103. 103. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.  JSF provides a set of associated custom tags to create forms with complex interfaces.  JSF is event-driven; codes needed for these events are easy to designate.Accenture Confidential 103
    104. 104. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.  JSF provides a set of associated custom tags to create forms with complex interfaces.  JSF is event-driven; codes needed for these events are easy to designate.  JSF has built-in validation and conversion properties.Accenture Confidential 104
    105. 105. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.  JSF provides a set of associated custom tags to create forms with complex interfaces.  JSF is event-driven; codes needed for these events are easy to designate.  JSF has built-in validation and conversion properties.  JSF makes combining complex GUIs into a single manageable component relatively easy.Accenture Confidential 105
    106. 106. Advantages of JSF  JSF provides a concise and powerful language for accessing bean properties and collection elements.  JSF provides a set of associated custom tags to create forms with complex interfaces.  JSF is event-driven; codes needed for these events are easy to designate.  JSF has built-in validation and conversion properties.  JSF makes combining complex GUIs into a single manageable component relatively easy.  JSF has a simpler configuration file and over-all structure.Accenture Confidential 106
    107. 107. Questions & Comments Two options to ask a question or add your comments to the discussion:  Use Raise Hand and then hold down the TALK icon or press the CTRL key; release when done  Post your question in the Chat RoomAccenture Confidential
    108. 108. Thank you for participating!Accenture Confidential
    109. 109. References 1. 2007, Java Server Faces: The Complete Reference by Chris Schalk, Ed Burns and James Holmes 2. 2004, Mastering Java Server Faces by Bill Dudney, Jonathan Lehr, Bill Willis and Leroy Mattingly 3. 2005, Developing Web-based User Interfaces Using Java Server Faces (Skillsoft press)Accenture Confidential 109

    ×