Book description
Master the art of implementing user interfaces with JSF 2.2
In Detail
JavaServer Faces (JSF) is a leading framework and core component of Java Platform Enterprise Edition. JSF is the standard Java EE technology used to build web user interfaces. JSF 2.2 is a recent release with an extensive list of new features, some of which have been expected for a long time and are now ready to be implemented.
Starting out with a very basic topic, Expression Language, you will continue onwards covering a wide range of JSF sectors, such as JSF communication, JSF scopes, and so on. Throughout the book, you will master JSF artifacts (AJAX, HTML5, configurations, renders, handlers, listeners, events, factories, tabular data, custom components, Facelets, and so on) in a compendium of programming practices and informative examples
You then round off with a detailed discussion on the capabilities of Facelets. Overall, this book helps you gain knowledge on the latest JSF features in an interesting and original approach. Adding these skills to your personal arsenal will turn you into a veritable JSF master.
What You Will Learn
- Discover how to write custom JSF 2.2 themes, custom factories, handlers, renderers, and components
- Access unlimited developing scenarios with the concept of dependency injection
- Enhance your applications with JSF 2.2 upload component and HTML5 friendly markup
- Master the new JSF 2.2 Window ID technique
- Gain insights into managing the application state with stateless viewsExplore the new CDI @ViewScoped and @FlowScoped (detailed presentation)
Table of contents
-
Mastering JavaServer Faces 2.2
- Table of Contents
- Mastering JavaServer Faces 2.2
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Dynamic Access to JSF Application Data through Expression Language (EL 3.0)
-
2. Communication in JSF
-
Passing and getting parameters
- Using context parameters
- Passing request parameters with the <f:param> tag
- Working with view parameters
- Calling actions on GET requests
- Passing attributes with the <f:attribute> tag
- Setting property values via action listeners
- Passing parameters using the Flash scope
- Replacing the <f:param> tag with the JSTL <c:set> tag
- Sending data through cookies
- Working with hidden fields
- Sending passwords
- Accessing UI component attributes programmatically
- Passing parameters via method expressions
- Communicating via the binding attribute
- Managed bean communication
- Summary
-
Passing and getting parameters
- 3. JSF Scopes – Lifespan and Use in Managed Beans Communication
-
4. JSF Configurations Using XML Files and Annotations – Part 1
- JSF 2.2 new namespaces
- JSF 2.2 programmatic configuration
- Configuring managed beans in XML
- Working with multiple configuration files
- Configuring locales and resource bundles
- Configuring validators and converters
- Configuring navigation
- Configuring action listeners
- Configuring system event listeners
- Configuring phase listeners
- Working with @ListenerFor and @ListenersFor
- Summary
- 5. JSF Configurations Using XML Files and Annotations – Part 2
-
6. Working with Tabular Data
- Creating a simple JSF table
- The CollectionDataModel class of JSF 2.2
- Sorting tables
- Deleting a table row
- Editing/updating a table row
- Adding a new row
- Displaying row numbers
- Selecting a single row
- Selecting multiple rows
- Nesting tables
- Paginating tables
- Generating tables with the JSF API
- Filtering tables
- Styling tables
- Summary
-
7. JSF and AJAX
- A brief overview of the JSF-AJAX lifecycle
- A simple JSF-AJAX example to get started
- The JSF-AJAX attributes
- Grouping components under <f:ajax> tag
- Updating input fields with AJAX after validation error
- Mixing AJAX and flow scope
- Postback and AJAX
- Is it a non-AJAX request?
- AJAX and <f:param>
- Queue control for AJAX requests
- Explicit loading of jsf.js
- AJAX and the progress bar/indicator
- Summary
-
8. JSF 2.2 – HTML5 and Upload
- Working with HTML5 and JSF 2.2
-
JSF 2.2 upload feature
- A simple JSF 2.2 upload example
- Using multiple <h:inputFile> elements
- Extracting info about a file to be uploaded
- Writing uploaded data to a disk
- Upload validator
- Ajaxify the upload
- Uploading images with preview
- Uploading multiple files
- Upload and the indeterminate progress bar
- Upload and the determinate progress bar
- Summary
-
9. JSF State Management
- JSF saving the view state
- JSF 2.2 is stateless
- JSF security notes
- Summary
-
10. JSF Custom Components
- Building noncomposite custom components
-
Building composite components
- Developing the Temperature composite component
- Transforming a jQuery component into composite component
- Writing the HTML5 date picker as a composite component
- Decorating an image with actions
- Working with composite facets
- Validating/converting inputs inside composite components
- Checking the presence of an attribute
- Composite components' pitfalls
- Hiding pass-through attributes in composite components
- Distributing composite components as JARs in JSF 2.2
- Adding composite components programmatically
- Summary
- 11. JSF 2.2 Resource Library Contracts – Themes
-
12. Facelets Templating
- A brief overview of the Facelets tags
- Creating a simple template – PageLayout
- Passing parameters via <ui:param>
- Passing bean properties and action methods via <ui:param>
- Exploiting the <ui:decorate> and <ui:fragment> tags
- Iterating with <ui:repeat>
- Working with <ui:include> and <f:viewParam>
- Working with <ui:include> and <ui:param>
- Debugging with <ui:debug>
- Removing the content with <ui:remove>
- Using the jsfc attribute
- Extending the PageLayout template
- Facelets' programmatic aspects
- Facelets pitfalls
- Summary
- A. The JSF Life Cycle
- Index
Product information
- Title: Mastering JavaServer Faces 2.2
- Author(s):
- Release date: June 2014
- Publisher(s): Packt Publishing
- ISBN: 9781782176466
You might also like
book
JavaServer Faces
JavaServer Faces, or JSF, brings a component-based model to web application development that's similar to the …
book
JavaServer Faces: Introduction By Example
This book is about using JavaServer Faces to create and deploy interactive applications delivered to end …
book
JavaServer Faces 2.0, The Complete Reference
The Definitive Guide to JavaServer Faces 2.0 Fully revised and updated for all of the changes …
book
iPhoto 5: The Missing Manual, Fourth Edition
Our Missing Manual is hands-down the bestselling book on iPhoto. And now, updated to cover Apple's …