Vous êtes sur la page 1sur 5

Preface

PrimeFaces is a leading open source user interface (UI) component library for Ja
va Server
Faces (JSF)-based web applications. PrimeFaces provides more than 100 UI compone
nts with
a rich look and feel and theming support. At the time of writing this book, the
latest version
of PrimeFaces is 4.0, which works well with JSF 2.x.
PrimeFaces Beginner's Guide will take you through the process of installing, con
figuring, and
using PrimeFaces in your JSF-based web applications. Usage of PrimeFaces compone
nts are
explained through simple and practical examples with step-by-step instructions.
By the end
of the book, you will have a hands-on experience on how to use PrimeFaces effect
ively.
What this book covers
Chapter 1, Introduction to PrimeFaces, introduces PrimeFaces, along with details
on how
to install and configure it by creating a simple Hello World application. This c
hapter also
provides an overview of various PrimeFaces features, such as AJAX support, Parti
al Page
Rendering (PPR), and explains Poll and Remote Command components, which come in
very handy at times.
Chapter 2, Introducing Sample Application TechBuzz, provides an overview of the
sample
application TechBuzz, which we are going to build incrementally throughout the b
ook, and
explains what PrimeFaces components will be used for various requirements. This
chapter
also provides an overall picture on setting up the development environment with
all the
required software, such as JDK, IDE, database, and so on.
Chapter 3, Using PrimeFaces Common Utility Components, introduces various common
ly
used utility components provided by PrimeFaces, such as Growl, Tooltip, BlockUI,
NotificationBar, and so on. This chapter also explains new features introduced i
n PrimeFaces
4.0, such as Fragment, Sticky, Search Expression Framework, and Dialog Framework
.
https://www.facebook.com/groups/ebooksforjava/
Preface
[ 2 ]
Chapter 4, Introducing PrimeFaces Client Side Validation Framework, covers Prime
Faces
Client Side Validations (CSV) Framework in detail, explaining how to configure a
nd enable
client-side validations, integrating the CSV framework with the Bean Validation
API, and
extending the CSV framework to support custom JSF Validators/-Converters and cus
tom
Bean Validation Annotations.
Chapter 5, Introducing Text Input Components, covers various input text componen
ts such
as InputText, InputTextArea, Password, InputMask, Inplace Editor, and Rich Text
Editor. This
chapter also explains the AutoComplete component in detail, explaining how to us
e it with
POJO support, multiple item selection, and so on.
Chapter 6, Working with Selection Input Components, covers several PrimeFaces
selection components, including SelectOneMenu, SelectManyMenu, SelectOneRadio,
SelectManyCheckbox, PickList, MultiSelectListbox, and so on.
Chapter 7, Introducing Advanced Input Components, explains how to work with adva
nced
input components, such as Calendar, Rating, Spinner, and Slider. Readers will al
so learn
about uploading and downloading files using FileUpload and FileDownload componen
ts.
This chapter also explains how to prevent span and bots using CAPTCHA validation
.
Chapter 8, Working with Data Components, covers various data components, such as
DataList, DataGrid, and explains DataTable features in depth, including paginati
on, sorting,
filtering, row/cell editing, and so on. Readers will also learn about exporting
DataTable data
to Excel, PDF, and XML using the DataExporter component.
Chapter 9, Introducing Advanced Data Visualization Components, introduces advanc
ed data
visualization components, such as Carousel, TagCloud, and Schedule. Readers will
also learn
about displaying data in a Tree structure using Tree and TreeTable components.
Chapter 10, Working with Layout Components, explains how to create simple and co
mplex
layouts using Panel, PanelGrid, AccordionPanel, TabView, and Layout components,
and
describes various customization options. This chapter also covers creating workf
low-style
forms using the Wizard component and Portal-like Layouts using the Dashboard com
ponent.
Chapter 11, Introducing Navigation Components, explains creating different style
s of menus
using various navigation components, such as Menu, SlideMenu, TieredMenu, Menuba
r,
MegaMenu, TabMenu, and Breadcrumb.
Chapter 12, Drawing Charts, covers how to visualize data in a graphical format u
sing a variety
of chart formats, such as Line, Bar, Pie, and Donut charts. This chapter also in
troduces how
to render charts created by the JFreeChart API.
Chapter 13, Using PrimeFaces Themes, introduces how to use built-in themes provi
ded
by PrimeFaces and how to create custom themes using the online ThemeRoller tool.
Readers will also learn about how to dynamically change themes using the ThemeSw
itcher
component. This chapter also gives a brief overview of various PrimeFaces siblin
g projects,
such as PrimeFaces Extensions, PrimeUI, PrimeFaces Mobile, and PrimeFaces Push.
https://www.facebook.com/groups/ebooksforjava/
Preface
[ 3 ]
What you need for this book
You will need the following software to follow the examples:
?? Java JDK 1.5+ (http://www.oracle.com/technetwork/java/javase/
downloads/index.html)
?? PrimeFaces latest version (http://www.primefaces.org/downloads.html)
?? MySQL (http://www.mysql.com/) or any other relational database that has a
JDBC driver
?? Eclipse (http://www.eclipse.org) or any of your favorite Java IDE
?? Apache Maven build tool (http://maven.apache.org/)
?? Browser tools: as we are going to learn a lot more about UI design using the
PrimeFaces component, it would be really helpful to have tools such as the FireB
ug
plugin for Firefox or Chrome Developer Tools for the Google Chrome browser
Who this book is for
This book is for you if you would like to learn and use PrimeFaces for your JSF-
based
applications, and if you are looking for a practical guide with an easy-tofollow,
step-by-step
approach along with plenty of examples. Prerequisites required for this book are
basic JSF
and jQuery skills.
Conventions
In this book, you will find several headings appearing frequently.
To give clear instructions of how to complete a procedure or task, we use:
Time for action heading
1. Action 1
2. Action 2
3. Action 3
Instructions often need some extra explanation so that they make sense, so they
are
followed with:
https://www.facebook.com/groups/ebooksforjava/
Preface
[ 4 ]
What just happened?
This heading explains the working of tasks or instructions that you have just co
mpleted.
You will also find a number of styles of text that distinguish between different
kinds of
information. Here are some examples of these styles, and an explanation of their
meaning.
Code words in text, database table names, folder names, filenames, file extensio
ns,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We
can
disable AJAX submit by setting attribute ajax="false"."
A block of code is set as follows:
<h:panelGrid columns="2">
<p:outputLabel value="UserName"/>
<p:inputText value="#{userController.userName}"/>
<p:outputLabel value="Password"/>
<p:password value="#{userController.password}"/>
<p:commandButton action="#{userController.login}" value="Login" />
</h:panelGrid>
When we wish to draw your attention to a particular part of a code block, the re
levant lines
or items are set in bold:
<h:panelGrid columns="2">
<p:outputLabel value="UserName"/>
<p:inputText value="#{userController.userName}"/>
<p:outputLabel value="Password"/>
<p:password value="#{userController.password}"/>
<p:commandButton action="#{userController.login}" value="Login" />
</h:panelGrid>
Any command-line input or output is written as follows:
cd /ProgramData/Propeople
rm -r Drush
git clone --branch master http://git.drupal.org/project/drush.git
https://www.facebook.com/groups/ebooksforjava/
Preface
[ 5 ]
New terms and important words are shown in bold. Words that you see on the scree
n, in
menus or dialog boxes for example, appear in the text like this: "On the Select
Destination
Location screen, click on Next to accept the default destination."
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about th
is book
what you liked or may have disliked. Reader feedback is important for us to deve
lop titles
that you really get the most out of.
To send us general feedback, simply send an e-mail to feedback@packtpub.com, and
mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either
writing or
contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you
to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased f
rom your
account at http://www.packtpub.com. If you purchased this book elsewhere, you ca
n
visit http://www.packtpub.com/support and register to have the files e-mailed di
rectly
to you.
https://www.facebook.com/groups/ebooksforjava/
Preface
[ 6 ]
Errata
Although we have taken every care to ensure the accuracy of our content, mistake
s do happen.
If you find a mistake in one of our booksmaybe a mistake in the text or the codewe
would be grateful if you would report this to us. By doing so, you can save othe
r readers from
frustration and help us improve subsequent versions of this book. If you find an
y errata, please
report them by visiting http://www.packtpub.com/submit-errata, selecting your bo
ok,
clicking on the errata submission form link, and entering the details of your er
rata. Once your
errata are verified, your submission will be accepted and the errata will be upl
oaded to our
website, or added to any list of existing errata, under the Errata section of th
at title.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all me
dia. At Packt,
we take the protection of our copyright and licenses very seriously. If you come
across any
illegal copies of our works, in any form, on the Internet, please provide us wit
h the location
address or website name immediately so that we can pursue a remedy.
Please contact us at copyright@packtpub.com with a link to the suspected
pirated material.
We appreciate your help in protecting our authors, and our ability

Vous aimerez peut-être aussi