Practical RichFaces_ The Definitive Guide to Using the RichFaces 4 Libraries and Framework (2nd ed.) [Katz & Shaikovsky 2011-08-22].pdf

(21877 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
878879462.008.png
488
CHAPTER 9: Super Jumper: A 2D OpenGL ES Game
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
878879462.009.png 878879462.010.png
Contents at a Glance
Contents.................................................................................................................... v
About the Authors.................................................................................................. xiii
About the Technical Reviewer ............................................................................... xiv
Acknowledgments .................................................................................................. xv
Introduction ........................................................................................................... xvi
Chapter 1: The Basics ............................................................................................... 1
Chapter 2: Getting Started ...................................................................................... 13
Chapter 3: a4j:* Tags, Features and Concepts........................................................ 43
Chapter 4: Getting Started with Rich Components ................................................. 85
Chapter 5: Rich Input and Select Components ....................................................... 95
Chapter 6: Rich Panel and Output Components.................................................... 133
Chapter 7: Rich Data Iteration Components ......................................................... 175
Chapter 8: Rich Menu Components ...................................................................... 245
Chapter 9: Rich Tree Components ........................................................................ 265
Chapter 10: Rich Drag-and-Drop Components ..................................................... 287
Chapter 11: Rich Validation .................................................................................. 305
Chapter 12: Rich Components JavaScript API, Client Functions, and
Using jQuery...................................................................................... 317
Chapter 13: Skins ................................................................................................. 333
Chapter 14: RichFaces CDK: Building Custom Components ................................. 355
Index..................................................................................................................... 385
878879462.011.png 878879462.001.png 878879462.002.png 878879462.003.png 878879462.004.png
 
Introduction
We have been involved with JSF and RichFaces for many years now, including teaching JSF and
RichFaces courses for many years. From our experience, we have come to realize that many developers
are using RichFaces and JSF without understanding the full potential of the technology. Without this
understanding, developers can't fully utilize the framework.
Of course, after a bit of trial and error, almost everyone gets their application to work in some form.
However, developers often don’t understand why their particular application works. And, more
importantly, developers get frustrated and grow to dislike the technology. That's an important reason we
wrote this second edition of Practical RichFaces—to raise the level of understanding in the developer
community so this frustration can be avoided and so that RichFaces and JSF can be appreciated for the
great technologies they are.
This book is entirely based on the new and improved JSF 2 and covers the new and greatly improved
RichFaces 4. We cover all the most important concepts, features, tags, and components available in
RichFaces that you need to know—all in one place. While the book doesn’t try to cover every single
attribute for every single component, that’s not really necessary. However, with the solid understanding
of core concepts, features, and tags that you will get from this book, we guarantee you will be able to use
any RichFaces component.
Who Should Read This Book
The book is for anyone with a basic knowledge of JSF who wants to learn how to build Ajax-based
applications with RichFaces. If you are completely new to JSF, we recommend picking up a book on
JSF 2. Even if you have been using RichFaces 4 (or RichFaces 3), this book will fill in many of the gaps. We
are sure you will say at least once in the course of reading this book, “I didn’t know that was possible
with RichFaces!” or “I didn’t know I could do that!”
878879462.005.png
C H A P T E R 1
The Basics
Welcome to Practical RichFaces , second edition. In your hands (or on your computer/phone/tablet),
you’ve got everything you need to start developing cool and rich Ajax applications with JSF and
RichFaces. In this first chapter, we will give you a short overview of JavaServer Faces (JSF), as RichFaces
is a framework for JSF. Although we do assume that you have some knowledge of JSF, don’t worry—even
if you are just starting, we made sure the material and all the examples in this book are very easy to
understand. Once we cover JSF, we will discuss RichFaces: its features and the history behind it, how it
got started and where it is today. Lastly, we will share two stories to help you keep an open mind when
using JSF, as well as some tips on working with a server-side framework. The stories are from our
personal experiences and should help you become a better JSF and RichFaces developer.
Tell Me About RichFaces First!
You bought this book to learn about RichFaces, so we are going to squeeze in this short section so you
don’t have to wait. We will then do quick overview of JSF, and go back to telling you more about
RichFaces in more detail. You probably think of RichFaces as a rich component library (and that’s fine).
But, is it also much more. Rich components are just one of the main features that RichFaces offers.
RichFaces is a rich framework for JSF and offers rich and Ajax components in two tag libraries ( a4j: and
rich: ), a Skins feature, a client-side validation extension based on JSR-303 Bean Validation, and CDK
(Component Development Kit).
Of course you get many other features, which we will cover throughout the book, such as advanced
rendering features, event handling options, and Ajax client queue optimization. The components are
something you can “feel and touch,” so let us give you a quick example of what kind of components
RichFaces offers.
The a4j: tag library offers many core or foundation components, such as buttons and links with
built-in Ajax support, Ajax polling, and Ajax status. At this stage, however, it’s more interesting to look at
examples of components from the rich: tag library. In Figure 1-1, you can see a rich tab panel and
calendar components.
878879462.006.png 878879462.007.png
Zgłoś jeśli naruszono regulamin