Apache MyFaces 1.2 Web Application Development


Apache MyFaces 1.2 Web Application Development
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Build powerful and robust web applications with Apache MyFaces
  • Reduce coding by using sub-projects of MyFaces like Trinidad, Tobago, and Tomahawk
  • Update the content of your site daily with ease by using Facelets
  • Step-by-step and practical tutorial with lots of examples

Appendices

Book Details

Language : English
Paperback : 408 pages [ 235mm x 191mm ]
Release Date : March 2010
ISBN : 1847193250
ISBN 13 : 9781847193254
Author(s) : Bart Kummel
Topics and Technologies : All Books, Web Development, AJAX, Java, Open Source, Web Development


Table of Contents

Preface
Chapter 1: Introduction
Chapter 2: Getting Started
Chapter 3: Facelets
Chapter 4: Tomahawk
Chapter 5: Trinidad—the Basics
Chapter 6: Advanced Trinidad
Chapter 7: Trinidad Skinning and Tuning
Chapter 8: Integrating with the Backend
Chapter 9: MyFaces Orchestra
Chapter 10: Extensions Validator
Chapter 11: Best Practices
Appendices
Index
  • Chapter 1: Introduction
    • Introducing Apache MyFaces
      • License, community, and support
      • MyFaces and Sun JSF RI
    • Subprojects of Apache MyFaces
      • Core
      • Tomahawk
      • Sandbox
      • Trinidad
      • Tobago
      • Orchestra
      • Portlet Bridge
      • Extensions Validator
    • Summary
  • Chapter 2: Getting Started
    • Configuring the development environment
      • Configuring Eclipse
        • Installing extra plugins
        • Installing the libraries
        • Preparing a new project
      • Configuring JDeveloper
        • Installing the libraries
        • Preparing a new project
      • Creating a new project using Maven
    • Application server and configuration files
      • The web.xml configuration file
      • The faces-config.xml configuration file
      • Settings for specific application servers
        • Settings for MyFaces Core on GlassFish
        • Other application servers
    • Introduction to the example case
    • Summary
  • Chapter 3: Facelets
    • Why Facelets?
      • Content inverweaving
      • Templating
      • Don’t Repeat Yourself (DRY)
      • Expanding the Expression Language
      • Summarizing the benefits of Facelets
    • Setting up a Facelets project
      • Preparing web.xml
      • Preparing faces-config.xml
      • Creating a test page
      • Debugging easily with Facelets
    • Templating with Facelets
      • Creating a template
      • Using the template
      • Using comments in Facelets page definitions
      • Are Facelets files XHTML?
    • Creating and using composition components
      • Creating a tag library
      • Creating the composition component itself
        • Identifying redundancies
        • Creating a skeleton for the composition component
        • Defining the actual composition component
        • Adding validators without violating the DRY principle
        • Putting it all together
      • Using the composition component
    • Using static functions
    • Using inline texts
    • Facelets tags overview
      • <ui:component> tag
      • <ui:composition> tag
      • <ui:debug> tag
      • <ui:decorate> tag
      • <ui:define> tag
      • <ui:fragment> tag
      • <ui:include> tag
      • <ui:insert> tag
      • <ui:param> tag
      • <ui:remove> tag
      • <ui:repeat> tag
    • Summary
  • Chapter 4: Tomahawk
    • Setting up Tomahawk
      • Downloading Tomahawk
      • Configuring web.xml
      • Resolving dependencies
    • Using extended versions of standard components
    • Extended components
      • <t:aliasBean> and <t:aliasBeanScope> components
      • <t:buffer>
      • <t:captcha> component
    • Creating basic data tables
      • Setting up a data table
      • Adding columns to the table
      • Using pagination
      • Changing the looks of the data table
        • Styling the data table itself
        • Styling the data scroller
        • Looking at the result
    • Using advanced data table features
      • Sorting
        • Improving the sort arrows
      • Showing details inline
      • Linking to an edit form
      • Grouping rows
      • Newspaper columns
    • Uploading files
    • Working with dates and calendars
      • Using a pop-up calendar
        • Localizing the pop-up calendar
      • Using an inline calendar
      • Using the calendar in a form
    • Extra validators
      • Validating equality
      • Validating e-mail addresses
      • Validating credit card numbers
      • Validating against a pattern
    • Summary
  • Chapter 5: Trinidad—the Basics
    • Setting up Trinidad
      • Configuring the web.xml file
      • Configuring the faces-config.xml file
      • Configuring the trinidad-config.xml file
      • Adapting our template
    • Creating data tables
      • Adding columns
      • Using pagination
      • Displaying inline details
      • Configuring banding and grid lines
      • Using row selection
    • Creating input and edit forms
      • Exploring the common features of input components
        • Using automatic label rendering
        • Using error message support and the required indicator
        • Using auto submit
      • Creating plain text input fields
        • Using the <tr:inputText> component in a composition component
      • Creating date input fields
        • Converting dates
        • Validating dates
        • Creating the ultimate date input composition component
      • Creating selection lists
        • Adding list contents
        • Optional empty selection for single selection lists
        • Options for all selection components
        • Checkboxes and radio buttons
        • Listboxes
        • Choice list
        • Shuttle
        • Ordering shuttle
        • Creating a universal composition component for selections
      • Creating fields for numerical input
        • Adding conversion to a field
        • Adding validation to a field
        • Adding a spin box to an input field
    • File uploading
      • Meeting the prerequisites
      • Using the file upload component
        • Creating and using a file upload composition component
        • Saving the file in the backing bean
      • Configuring file upload limits
        • Setting upload limits in web.xml
        • Setting upload limits in trinidad-config.xml
    • Using Trinidad’s hierarchical navigation features
      • Configuring the hierarchy
      • Creating navigation panes
      • Creating breadcrumbs
      • Creating a hierarchical menu
    • Creating layouts for our pages
      • Using a border layout
        • Layout methods
      • Using group layout
      • Using a horizontal layout
      • Creating layouts for input forms
        • Grouping components
        • Label and message
        • Footer facet
      • Creating an accordion
      • Creating a tabbed panel
      • Creating a choice panel
      • Creating a radio panel
      • Displaying boxes
      • Displaying tips
      • Using a header panel
      • Using pop ups
      • Creating button bars
      • Using caption groups
      • Creating bulleted lists
      • Lay out a page by using the panel page component
      • Using the page header panel
    • Summary
  • Chapter 6: Advanced Trinidad
    • Data visualization
      • Creating the data model
        • Understanding the terminology
        • Implementing a minimal data model
        • Calculating the values
      • Initializing the data model
      • Adding a graph to a page
        • Changing data display
        • Changing the looks
      • Chart types
      • Some final thoughts on data visualization
    • Passing on data with page flows
    • Using AJAX and Partial Page Rendering
      • Comparing full submit and partial submit
      • Using the autoSubmit and partialTriggers attributes
      • Working with partialTriggers and naming containers
      • Creating a status indicator
      • Using the addPartialTarget() method
      • Dynamically hiding or showing components
      • Polling
      • Exploring the possibilities of PPR
    • Creating dialogs
      • Building a dialog
        • Creating the backing bean for the dialog
        • Using an alternative way of returning values
      • Calling the dialog
      • Receiving the dialog’s output
      • Using inputListOfValues as an easier alternative
      • Using lightweight dialogs
    • Client-side validation and conversion
      • Defining the data structure
      • Creating the converter
      • Enabling client-side capabilities
        • Implementing the client-side code
      • Creating the validator
        • Enabling client-side capabilities
        • Implementing the client-side code
      • Wiring everything together
        • Declaring the converter and validator in faces-config.xml
        • Creating custom tags
        • Using the converter and validator in a page
      • Internationalization of messages
        • Changing getClientValidator()
        • Changing the JavaScript constructor
        • Formatting the error message
      • Using Trinidad’s JavaScript API
      • Writing, testing, and debugging JavaScript
        • Writing JavaScript code
        • Debugging
        • Logging
    • Summary
  • Chapter 7: Trinidad Skinning and Tuning
    • Skinning
      • Understanding the terminology
      • Setting up skinning
        • Letting the user choose the skin
      • Creating a Trinidad skin
        • Skinning components
        • Using component state selectors
        • Using component piece selectors
        • Setting global styles using alias selectors
        • Skinning icons
        • Skinning text
      • Extending skins
    • Tuning Trinidad
      • trinidad-config.xml file
      • web.xml file
      • Accessibility
        • Accessibility mode (T)
        • Accessibility profile (T)
        • Lightweight dialogs (W)
      • Performance
        • Page flow scope lifetime (T)
        • Uploaded file processor (T)
        • State saving (W)
        • Application view caching (W)
      • Debugging
        • Enabling debug output (T)
        • Turning off compression and obfuscation (W)
        • Changing deployed files (W)
      • Appearance
        • Client validation (T)
        • Output mode (T)
        • Skin family (T)
      • Localization
        • Time zone (T)
        • Two-digit year start (T)
        • Reading direction (T)
        • Number notation (T)
    • Summary
  • Chapter 8: Integrating with the Backend
    • The Model-View-Controller architecture
    • Setting up the Java EE application structure
      • Creating a skeleton EJB JAR
      • Creating an EAR to wrap them all
    • Preparing a database environment
      • Creating a database
      • Connecting to the database
      • Managing the database
      • Creating a table for employees
        • Populating the table with data
    • Implementing the Model
      • Creating an entity
      • Creating a service facade
      • Creating named queries
      • Defining persistence units
      • Defining a data source
    • Using the service facade in the View layer
      • Updating the pages
    • Limitations and problems
      • Transactions
      • Validation of data
    • Summary
  • Chapter 9: MyFaces Orchestra
    • Setting up Orchestra
      • Adapting the application structure
      • Downloading the Spring framework
      • Configuring Spring
        • Letting Spring manage the beans
        • Configuring the faces-config.xml file for Spring
        • Configuring the web.xml file for Spring
        • Configuring Spring and persistence
        • Accessing the services
      • Downloading and installing Orchestra
      • Configuring Orchestra
    • Using the Orchestra ViewController
      • Using event methods
    • Setting up Orchestra conversations
      • Creating a conversation
      • Extending the conversation
      • Ending the conversation
    • Generating forms with DynaForm
      • Installing DynaForm
      • Using DynaForm
    • Summary
  • Chapter 10: Extensions Validator
    • Setting up ExtVal
    • Basic usage
    • Complementing JPA annotations
      • Using ExtVal annotations for standard JSF validators
        • Defining length validation
        • Defining double range validation
        • Defining long range validation
        • Defining required fields
      • Using ExtVal’s additional annotations
        • Defining pattern-based validation
        • Using custom validators
      • Reusing validation
    • Applying cross validation
      • Using cross validation for date values
      • Using cross validation based on equality
      • Making a value required conditionally
    • Creating custom error messages
      • Overriding standard JSF error messages
      • Overriding ExtVal default error messages
    • Creating our own validation strategy
      • Implementing a custom validation strategy
      • Configuring ExtVal to use a custom validation strategy
        • Using alternative configuration add-ons
      • Testing the custom validation strategy
      • Extending ExtVal in many other ways
    • Extending ExtVal with add-ons
      • Getting add-ons for ExtVal
      • Installing ExtVal add-ons
    • Using Bean Validation
      • Setting up Bean Validation and ExtVal
      • Using Bean Validation annotations
      • Reusing validation
        • Inheriting validation
        • Using recursive validation
        • Composing custom constraints
      • Using payloads to set severity levels
        • Setting up the Continue with warnings add-on
        • Setting the severity level of a constraint
        • Setting the severity level on ExtVal Property Validation constraints
        • Setting the severity level on any constraint
    • Summary
  • Chapter 11: Best Practices
    • Preventing direct access to page definitions
    • Using container-managed security with JSF
      • Enabling container-managed security
      • Navigating to the login page
      • Creating the login page
        • Alternatives
      • Logout link
    • Component bindings
    • Keeping the state of a component
    • Summary
  • Appendices
    • http://www.packtpub.com/files/3254-Appendices.pdf

Bart Kummel

Bart Kummel is an experienced Java EE developer and architect living in The Netherlands. He studied Electrical Engineering at the Delft University of Technology and graduated with honor from the Hogeschool van Amsterdam, with a specialization in Technical Computer Sciences. After his study, he started as a developer of embedded software for a security systems manufacturer in Amsterdam. After four years of developing embedded software, Bart switched to enterprise software and started at Transfer Solutions B.V., based in Leerdam. Transfer Solutions is a consulting company that specializes in Oracle and Java technology.

As a consultant for Transfer Solutions, Bart gained a lot of experience with Java EE. For different clients, he has fulfilled the roles of developer or architect in small as well as large projects. In those projects, he has worked with various frameworks and standards, including Oracle’s Application Development Framework (ADF), Apache MyFaces, EclipseLink, JavaServer Faces (JSF), Java Persistence API (JPA), and Java Messaging Service (JMS). Bart also teaches courses in Object Orientation, UML, Java, Java EE, and ADF, at Transfer Solutions’ education department.

Bart published an article on EclipseLink in the Dutch Java Magazine, and presented the use of AJAX capabilities in Oracle’s ADF Faces at the ODTUG Kaleidoscope conference in 2007.

The link to his website is www.bartkummel.net

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Apache MyFaces 1.2 Web Application Development +    Java EE 6 with GlassFish 3 Application Server =
50% Off
the second eBook
Price for both: $39.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Create appealing and easy-to-use templates with Facelets
  • Assure reusability of your code by constructing composition components
  • Build consistent looking and usable pages using Trinidad components
  • Extend your JSF standard by using Tomahawk components
  • Enhance your web application by enabling AJAX functionality in your JSF application without writing JavaScript code
  • Create dynamic applications that fit the corporate style and color scheme of your company by using the extensive skinning capabilities of Trinidad
  • Prevent the duplication of validation rules by adding EJB3 annotation-based validation with ExtVal
  • Optimize your JSF application in terms of performance and page size

In Detail

Hypes and trends (such as Web 2.0) cause a change in the requirements for user interfaces every now and then. While a lot of frameworks are capable of meeting those changing requirements, it often means you as a developer need in-depth knowledge of web standards, such as XHTML and JavaScript. A framework like Apache MyFaces that hides all details of how the page is rendered at the client and at the same time offers a rich set of tools and building blocks could save you a lot of time, not only when you're building a brand new application but also when you're adapting an existing application to meet new user interface requirements.

This book will teach you everything you need to know to build appealing web interfaces with Apache MyFaces and maintain your code in a pragmatic way. It describes all the steps that are involved in building a user interface with Apache MyFaces. This includes building templates and composition components with Facelets, using all sorts of specialized components from the Tomahawk, Trinidad, and Tobago component sets and adding validation with MyFaces Extensions Validator.

The book uses a step-by-step approach and contains a lot of tips based on experience of the MyFaces libraries in real-world projects. Throughout the book an example scenario is used to work towards a fully functional application when the book is finished.

This step-by-step guide will help you to build a fully functional and powerful application.

This book will teach you everything you need to know in order to build appealing web interfaces with Apache MyFaces in a pragmatic way.

Approach

The book is written as a step-by-step, example-driven tutorial designed to be worked through step by step working on the example code as you learn. A fun example scenario is used throughout the book and of course all source code is available to download from the author's web site. The book is packed with tips and tricks, based on experience with MyFaces in real-life projects.

Who this book is for

This book is intended for Java developers who want to develop web frontends for their enterprise applications using Apache MyFaces as JSF implementation. Some basic knowledge of JSF is expected.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software