PrimeFaces Cookbook - Second Edition
By Oleg Varaksin and Mert Çalışkan
()
About this ebook
- The updated second edition of the first PrimeFaces book ever released is brought to you straight from the horse’s mouth, and focuses on practical implementations of the framework rather than theoretical ones
- With this book, you will get everything you need to know about PrimeFaces first-hand and will learn how to easily integrate and use PrimeFaces successfully with your JSF projects
- This book is written in a clear, comprehensible style and addresses a wide audience who set their scope on Java EE development
This book is for everybody who would like to learn modern Java web development based on PrimeFaces and is looking for a quick introduction to this matter. Prerequisites for this book are basic JSF, jQuery, and CSS skills.
Related to PrimeFaces Cookbook - Second Edition
Related ebooks
Learning PrimeFaces Extensions Development Rating: 0 out of 5 stars0 ratingsM Programming: A Comprehensive Guide Rating: 4 out of 5 stars4/5Cloud Computing Bible Rating: 4 out of 5 stars4/5Scribes of the Tribe, The Great Thinkers on Religion and Ethics: Myths and Scribes, #2 Rating: 0 out of 5 stars0 ratingsPractical TensorFlow.js: Deep Learning in Web App Development Rating: 0 out of 5 stars0 ratingsStruts 2 in Action Rating: 0 out of 5 stars0 ratingsSharePoint 2010 Web Parts in Action Rating: 0 out of 5 stars0 ratingsWhere to Place My Project: Code Hosting Platforms Rating: 0 out of 5 stars0 ratingsIBM Cognos Analytics Standard Requirements Rating: 0 out of 5 stars0 ratingsSQL and NoSQL Interview Questions: Your essential guide to acing SQL and NoSQL job interviews (English Edition) Rating: 0 out of 5 stars0 ratingsMicrosoft PowerShell, VBScript and JScript Bible Rating: 0 out of 5 stars0 ratingsAjax Bible Rating: 3 out of 5 stars3/5Practical Programming 6 in 1: Python Machine Learning, JavaScript, React 17, And Angular With Typescript Rating: 0 out of 5 stars0 ratingsAkka Cookbook Rating: 2 out of 5 stars2/5Scalatra in Action Rating: 0 out of 5 stars0 ratingsScala for Machine Learning Rating: 0 out of 5 stars0 ratingsUnleashing the Power of CSS Rating: 0 out of 5 stars0 ratingsCSSLP A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsGetting Started with Oracle WebLogic Server 12c: Developer’s Guide Rating: 0 out of 5 stars0 ratingsRestlet in Action: Developing RESTful web APIs in Java Rating: 0 out of 5 stars0 ratingsThe FBI File on Steve Jobs Rating: 0 out of 5 stars0 ratingsCoding Languages: Angular With Typescript, Machine Learning With Python And React Javascript Rating: 0 out of 5 stars0 ratingsBasic Drupal: How to create, administer and maintain a Drupal Site Rating: 0 out of 5 stars0 ratingsJava 8 to 21: Explore and work with the cutting-edge features of Java 21 (English Edition) Rating: 0 out of 5 stars0 ratingsLiferay Beginner’s Guide Rating: 4 out of 5 stars4/5Mastering Google App Engine Rating: 0 out of 5 stars0 ratingsHTML5 for .NET Developers: Single page web apps, JavaScript, and semantic markup Rating: 0 out of 5 stars0 ratingsQmail Quickstarter: Install, Set Up and Run your own Email Server Rating: 0 out of 5 stars0 ratings
Programming For You
Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsWeb Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5101 Amazing Nintendo NES Facts: Includes facts about the Famicom Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratings
Reviews for PrimeFaces Cookbook - Second Edition
0 ratings0 reviews
Book preview
PrimeFaces Cookbook - Second Edition - Oleg Varaksin
Table of Contents
PrimeFaces Cookbook Second Edition
Credits
Foreword
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with PrimeFaces
Introduction
Setting up and configuring the PrimeFaces library
Getting ready
How to do it…
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
AJAX basics with process and update
How to do it...
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
PrimeFaces selectors
How to do it…
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
Partial process and update with fragments
How to do it…
How it works…
The PrimeFaces Cookbook Showcase application
Partial view submit
How to do it…
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
Internationalization (i18n) and Localization (L10n)
Getting ready
How to do it…
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
Right to left language support
How to do it...
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
Improved resource ordering
How to do it…
How it works…
There's more…
The PrimeFaces Cookbook Showcase application
2. Theming Concepts
Introduction
Understanding structural and skinning CSS
Getting ready
How to do it…
How it works…
There's more…
Installing themes
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing default theme styles
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
See also
Adjusting the font and size throughout the web application
How to do it…
How it works…
See also
Simple ways to create a new theme
Getting ready
How to do it…
How it works…
There's more…
Stateless and stateful theme switchers
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Integrating Font Awesome with PrimeFaces
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
3. Enhanced Inputs and Selects
Introduction
Formatted input with inputMask
How to do it...
How it works…
There's more…
Using the asterisk (*) character
Making a part of the mask optional
Dynamically changing the mask value
PrimeFaces Cookbook Showcase application
Auto suggestion with autoComplete
How to do it…
There's more…
Instant AJAX selection
Multiple selection
Adding item tip
Grouping on items
PrimeFaces Cookbook Showcase application
Usable features of inputTextArea
How to do it…
How it works…
There's more…
Autocomplete on content
PrimeFaces Cookbook Showcase application
Discovering selectBooleanCheckbox and selectManyCheckbox
How to do it…
There's more…
Selection with AJAX behavior on selectBooleanCheckbox
PrimeFaces Cookbook Showcase application
See also
Choosing a single item with selectOneMenu
How to do it…
There's more...
Filtering on items
PrimeFaces Cookbook Showcase application
Basic and advanced calendar scenarios
How to do it…
There's more...
Localization of the calendar
Effects with the calendar
Picking time with the calendar
PrimeFaces Cookbook Showcase application
See also
Spinner – different ways to provide input
How to do it…
There's more…
Adding prefix and suffix
Applying boundaries to the input
Adjusting the width of the spinner
AJAX update with spinner
PrimeFaces Cookbook Showcase application
Slider – different ways to provide input
How to do it…
There's more...
Displaying the value of the slider
Disabling manual input with the slider
Selecting a range with slider
AJAX behavior events on slider
PrimeFaces Cookbook Showcase application
See also
Rich text editing with the editor
How to do it…
There's more…
Clearing the contents of the editor
Embedding the editor inside a dialog box
PrimeFaces Cookbook Showcase application
Advanced editing with an in-place editor
How it works…
There's more…
Editing with confirmation buttons
Giving effects to the in-place input
Adding facets
AJAX behavior events
PrimeFaces Cookbook Showcase application
Enhanced password input
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Star-based rating input
How to do it…
There's more…
AJAX behavior events
PrimeFaces Cookbook Showcase application
See also
4. Grouping Content with Panels
Introduction
Grouping content with a standard panel
How to do it…
There's more…
Custom actions
AJAX behavior events on panel
PrimeFaces Cookbook Showcase application
See also
PanelGrid with colspan and rowspan support
How to do it…
There's more…
PrimeFaces Cookbook Showcase application
Vertical stacked panels with accordion
How to do it...
There's more…
Dynamic content loading
Dynamic tabbing
AJAX behavior events on accordion
PrimeFaces Cookbook Showcase application
See also
Displaying overflowed content with scrollPanel
How to do it…
PrimeFaces Cookbook Showcase application
Working with a tabbed panel
How to do it...
There's more…
Orientation of the tabs
Dynamic tabbing
Transition effects
AJAX behavior events on tabView
PrimeFaces Cookbook Showcase application
See also
Grouping of buttons and more with toolbar
How to do it…
PrimeFaces Cookbook Showcase application
The multipurpose output panel
How to do it…
There's more…
Using panel as a placeholder component
PrimeFaces Cookbook Showcase application
Simulating the portal environment with dashboard
How to do it…
There's more…
Creating new widgets
Having fixed-sized columns
PrimeFaces Cookbook Showcase application
See also
Creating complex layouts
How to do it…
How it works…
There's more…
Element-based layouts
Nested layouts
AJAX behavior events on layout
PrimeFaces Cookbook Showcase application
See also
Responsive layout with Grid CSS
How to do it…
There's more…
Nesting div elements
The PrimeFaces Cookbook Showcase application
5. Data Iteration Components
Introduction
Selecting rows in dataTable
How to do it…
There's more…
Single selection with a row click
Single selection with radio buttons
Multiple selection with checkboxes
Instant row selection
PrimeFaces Cookbook Showcase application
See also
Sorting and filtering data in dataTable
How to do it…
There's more…
Custom filtering
Options for filtering
Global filtering
Postprocessing events on sorting/filtering
PrimeFaces Cookbook Showcase application
In-cell editing with dataTable
How to do it…
There's more…
Editing rows according to a condition
AJAX behavior events
PrimeFaces Cookbook Showcase application
See also
Resizing, reordering, and toggling columns in dataTable
How to do it…
There's more…
AJAX behavior events on resize
AJAX behavior events on row and column reordering
Toggling columns
AJAX behavior event on column toggling
Adding state for column toggling
PrimeFaces Cookbook Showcase application
See also
Making dataTable responsive
How to do it…
There's more…
PrimeFaces Cookbook Showcase application
Using subTable for grouping
How to do it…
PrimeFaces Cookbook Showcase application
Handling tons of data – LazyDataModel
How to do it…
There's more…
PrimeFaces Cookbook Showcase application
Listing data with dataList
How to do it…
There's more…
Pagination
PrimeFaces Cookbook Showcase application
Listing data with pickList
How to do it…
There's more…
Control buttons visibility
POJO support
Transition effects
Executing custom JavaScript on transfer
AJAX behavior events
PrimeFaces Cookbook Showcase application
See also
Listing data with orderList
How to do it…
There's more…
Transition effects
PrimeFaces Cookbook Showcase application
Visualizing data with tree
How to do it…
There's more…
Node type support
Node selection
Drag and drop
AJAX behavior events
Context menu support
Horizontal layout
PrimeFaces Cookbook Showcase application
Visualizing data with treeTable
How to do it…
There's more…
Node selection
Sorting
Context menu support
AJAX behavior events
PrimeFaces Cookbook Showcase application
Exporting data in various formats
How to do it…
How it works…
There's more…
Preprocessing and postprocessing of documents
Monitoring export status
PrimeFaces Cookbook Showcase application
Managing events with schedule by leveraging lazy loading
How to do it…
How it works…
There's more…
AJAX behavior events
Locale support
PrimeFaces Cookbook Showcase application
See also
Visualizing data with dataScroller
How to do it…
There's more…
Providing buffer
Loading with a button
Lazy loading
PrimeFaces Cookbook Showcase application
6. Endless Menu Variations
Introduction
Statically and dynamically positioned menus
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Creating programmatic menus
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
The context menu with nested items
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Integrating the context menu
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Breadcrumb – providing contextual information about page hierarchy
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
SlideMenu – menu in the iPod style
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
TieredMenu – submenus in nested overlays
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
MegaMenu – the multicolumn menu
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
PanelMenu – hybrid of accordion and tree
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
MenuButton – multiple items in a popup
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Accessing commands via menubar
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Displaying checkboxes in selectCheckboxMenu
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
7. Working with Files, Images, and Multimedia
Introduction
Basic, automatic, drag and drop, and multiple file uploading
How to do it…
How it works…
There's more…
Accessing files with a listener
Restricting file upload by type
Limiting maximum size
Uploading multiple files
Handling upload with client-side callbacks
Uploading files with drag-and-drop
PrimeFaces Cookbook Showcase application
See also
Downloading files
How to do it…
There's more…
Monitoring download status
PrimeFaces Cookbook Showcase application
Cropping images
How to do it...
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Creating dynamic image streaming programmatically
How to do it…
How it works...
PrimeFaces Cookbook Showcase application
Displaying a collection of images with galleria
How to do it…
How it works…
There's more…
Transition effects
Displaying a collection of images
Displaying captions on items
PrimeFaces Cookbook Showcase application
Displaying a collection of images with imageSwitch
How to do it…
There's more…
Displaying a collection of images
PrimeFaces Cookbook Showcase application
Displaying a collection of images with contentFlow
How to do it…
There's more…
Displaying captions with images
PrimeFaces Cookbook Showcase application
Embedding the multimedia content in JSF pages
How to do it…
How it works…
There's more…
Dynamic content streaming
PrimeFaces Cookbook Showcase application
Capturing images with photoCam
How to do it…
How it works…
There's more…
Authorizing access to the camera
PrimeFaces Cookbook Showcase application
8. Drag Me, Drop Me
Introduction
Making a component draggable
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Restricting dragging by axis, grid, and containment
How to do it…
How it works…
See also
PrimeFaces Cookbook Showcase application
Snapping to the edges of nearest elements
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Defining droppable targets
How to do it…
How it works…
See also
PrimeFaces Cookbook Showcase application
Restricting dropping by tolerance and acceptance
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
AJAX-enhanced drag and drop
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Integrating drag and drop with data iteration components
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
9. Creating Charts and Maps
Introduction
Creating line, area, bar, and pie charts
How to do it…
There's more…
Creating area charts
Creating bar charts
Creating pie charts
PrimeFaces Cookbook Showcase application
Creating combined charts
How to do it…
PrimeFaces Cookbook Showcase application
Updating live data in charts with polling
How to do it…
PrimeFaces Cookbook Showcase application
Interacting with charts via AJAX
How to do it…
PrimeFaces Cookbook Showcase application
Basic mapping with GMaps
How to do it…
How it works…
There's more…
Configuring controls
PrimeFaces Cookbook Showcase application
Adding, selecting, and dragging markers in maps
How to do it…
There's more…
Selecting markers
Dragging markers
PrimeFaces Cookbook Showcase application
Creating rectangles, circles, polylines, and polygons in maps
How to do it…
PrimeFaces Cookbook Showcase application
Enabling InfoWindow and streetView on maps
How to do it…
There's more…
PrimeFaces Cookbook Showcase application
10. Client-side Validation
Introduction
Configuring and getting started with CSV
Getting ready
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Instant validation with p:clientValidator
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Bean Validation and transformation
Getting ready
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Extending CSV with JSF
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
Extending CSV with Bean Validation
How to do it…
How it works…
There's more…
See also
PrimeFaces Cookbook Showcase application
11. Miscellaneous Advanced Use Cases
Introduction
Programmatic updating and scrolling with RequestContext
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Two ways of triggering the JavaScript execution
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Adding AJAX callback parameters – validation within a dialog
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Opening external pages in dynamically generated dialogs
Getting ready
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Polling – sending periodical AJAX requests
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Blocking page pieces during long-running AJAX calls
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Controlling form submission using defaultCommand
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Clever focus management in forms
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Layout pitfalls of menus and dialogs
How to do it…
How it works…
See also
PrimeFaces Cookbook Showcase application
Targetable messages with severity levels
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Conditional coloring in dataTable
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Sticking a component when scrolling
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Reducing page load time using content caching
Getting ready
How to do it…
How it works…
There's more…
PrimeFaces Cookbook Showcase application
Possibilities for exception handling in PrimeFaces
Getting ready
How to do it…
How it works…
PrimeFaces Cookbook Showcase application
Index
PrimeFaces Cookbook Second Edition
PrimeFaces Cookbook Second Edition
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2013
Second edition: May 2015
Production reference: 1250515
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-342-7
www.packtpub.com
Credits
Authors
Mert Çalışkan
Oleg Varaksin
Reviewers
Ramanath Bhongale
Aristides Villarreal Bravo
Sebastian D'Agostino
Commissioning Editor
Akram Hussain
Acquisition Editors
Tushar Gupta
Llewellyn Rozario
Content Development Editor
Ajinkya Paranjape
Technical Editor
Humera Shaikh
Copy Editors
Sarang Chari
Sonia Mathur
Project Coordinator
Harshal Ved
Proofreaders
Stephen Copestake
Safis Editing
Indexer
Mariammal Chettiyar
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Foreword
JavaServer Faces has come a long way since its initial release. This is mostly due to the big ecosystem around it that allows many third-party add-ons to contribute. The first major extension was Facelets that removed the burden of JSP-based views.
With 2.0, Facelets became standard, and along with Facelets, many other features, including AJAX, originated from the community. JSF 2.2 followed the same approach and integrated various enhancements, such as HTML5-friendly markup, resource library contracts, and Faces Flows. Considering the current landspace of modern web application development, a server-side component framework such as JSF is still a popular choice among Java developers; this is because JSF is flexible enough to keep up.
I started PrimeFaces back in 2009 to provide a new alternative component suite to the JSF ecosystem. As of now, PrimeFaces is the most popular framework and the de facto standard for JSF applications built with Java EE. During this time, the component suite has extended to an over-100-rich suite of components utilizing modern JavaScript and CSS techniques, integrating responsive design, and providing mobile and push modules.
PrimeFaces is documented well in PrimeFaces User Guide, and Showcase is considered to be a practical guide in itself. However, there are many cases that can only be seen when doing actual development and are not to be found in the guide or Showcase. PrimeFaces Cookbook, Second Edition, focuses on these cases in a practical way to provide best practices as solutions to common requirements.
I've known Mert and Oleg for a long time; both are power users of PrimeFaces and longtime contributors to the framework. Their expertise in PrimeFaces makes this book a great complementary resource when developing applications with PrimeFaces.
Çağatay Çivici
Founder and Lead Developer of PrimeFaces
Foreword
I consider it a great blessing to have been associated with the JavaServer Faces technology for such a long time. In the 11 years since JSF 1.0 was released, the little corner of the enterprise software world in which JSF plays has experienced an enormous amount of growth and change, but it is still the world of enterprise software. During this time, I have come to have a deep appreciation of the unique technical and nontechnical requirements of enterprise software. This appreciation has shown me that these two aspects are very closely linked, and any framework that wants to play in the enterprise software space must broadly and deeply address both of them. The fact that there is still demand for the continued evolution of JSF is a testament to the ecosystem behind JSF and also how well it addresses these aspects.
One of the key nontechnical requirements of enterprise software is the ability to build projects that have very long service lifetimes. To do this, enterprises need technologies that are good enough to get the job done while having the necessary market backing and support guarantees to be trusted with mission-critical applications. This is where Java lives and thrives, and the Java Community Process (JCP) is the engine to develop Java.
There is a tension between the long service lifetime requirement of enterprise software and the constantly evolving state of the art. One element of this evolution is the rise and acceptance of open source software (OSS). When JSF first came out, enterprises looked at open source with a high degree of suspicion. Can we trust it? Will it be there for us throughout the service life for which we need it? Over time, enterprises have come to accept OSS. As the first part of Java to be made open source, JSF has ridden the crest of this trend. This was entirely enabled by the evolution of the JCP with which JSF is developed. Without the opening of the JCP to the ideas of OSS, JSF would have already faded out into nonuse. One could argue that the JCP has helped make OSS for enterprises.
The opening of the JCP was also a key enabler for the creation of the JSF component ecosystem, in which PrimeFaces is now the biggest player. I'm very grateful to all of the component libraries in the JSF ecosystem, in particular to PrimeFaces, for taking the core ideas of JSF and building on them to create solutions that can ultimately deliver real business value. Just as PrimeFaces takes the core ideas of JSF, Mert's and Oleg's book takes the core ideas of PrimeFaces and puts them in your hands for quick and easy deployment in your applications. These ideas are presented with frequent How to do it… and How it works… sections, showing first the practice and then the theory of PrimeFaces. With this style of presentation, Mert and Oleg cover the breadth and depth of PrimeFaces, diving down to the core underlying JSF when necessary to drive the point home.
I'm confident you'll find the second edition of this book a valuable resource as you develop JSF applications with PrimeFaces.
Ed Burns
JavaServer Faces Specification Co-lead
About the Authors
Mert Çalışkan is a software stylist living in Ankara, Turkey. He has more than 10 years of expertise in software development with the architectural design of Enterprise Java web applications. He is an advocate of open source for software projects such as PrimeFaces and has also been a committer and founder of various others.
He is the coauthor of the first edition of this book. He is also the coauthor of Beginning Spring by Wiley Publications. He is the founder of AnkaraJUG, which is the most active JUG in Turkey that has been having monthly meetups for 3 years now.
In 2014, he was entitled a Java Champion for his achievements. He is also a Sun Certified Java professional since 2007. He does part-time lecturing at Hacettepe University on enterprise web application architecture and web services. He shares his knowledge at national and international conferences, such as JDays 2015, JavaOne 2013, JDC2010, and JSFDays'08. You can reach Mert via twitter at @mertcal.
First, I would like to thank my friend Oleg Varaksin for joining me on this journey. I would also like to thank Çağatay Çivici and Ed Burns for crowning our book with their forewords—without their ideas and inspiration on the JSF ecosystem, this book wouldn't exist.
My thanks also go to Ajinkya Paranjape, content development editor; Humera Shaikh, technical editor; and Llewellyn Rozario, acquisition editor, all from Packt Publishing. I would also like to thank our reviewers, Aristides Villarreal Bravo and Sebastian D'Agostino, for the great job they have done in reviewing this book. These people accompanied us during the entire writing process and made the publication of this book possible with their support, suggestions, and reviews.
Last but not least, I would like to thank my mother, my father, my Tuğçe, and especially my beloved fiancé, Funda, who gives me her never ending support and enthusiasm.
Oleg Varaksin is a senior software engineer living in the Black Forest, Germany. He is a graduate computer scientist who studied informatics at Russian and German universities. His main occupation and daily bread
in the last 10 years has consisted of building various web applications based on JSP, JSF, CDI, Spring, web services, REST, jQuery, AngularJS, and HTML5. He has a deep understanding of web usability and accessibility.
Oleg is an experienced JSF expert and has been working with the PrimeFaces library since its beginning in 2009. He is also a well-known member of the PrimeFaces community and a cocreator of the PrimeFaces Extensions project on additional JSF components for PrimeFaces.
Besides the aforementioned technologies, he has worked as a frontend developer with many other web and JavaScript frameworks—Struts, GWT, Prototype, YUI library, and so on. He also implemented an AJAX framework before all the hype about AJAX began.
Oleg normally shares the knowledge he has acquired on his blog at http://ovaraksin.blogspot.de.
I would like to thank my family, especially my wife, Veronika; our advisers from Packt Publishing, Llewellyn Rozario and Ajinkya Paranjape; our reviewers; and the PrimeFaces project lead, Çağatay Çivici. These people accompanied us during the entire writing process and made the publication of the book possible with their support, suggestions, and reviews.
About the Reviewers
Aristides Villarreal Bravo is a Java developer, a member of the NetBeans Dream Team, and a leader of Java User Groups. He is also the CEO of Javscaz Software Developers. He currently lives in Panamá.
Aristides has organized and participated in various conferences and seminars related to Java, Java EE, the NetBeans platform, free software, and mobile devices, both nationally and internationally. He writes tutorials and blogs about Java, NetBeans, and web development too.
He has given several interviews on sites such as NetBeans, NetBeans Dzone, and javaHispano and developed various plugins for NetBeans.
He was a technical reviewer on one more book about PrimeFaces, PrimeFaces Blueprints, Packt Publishing.
I would like to thank my family for their support and patience.
Sebastian D'Agostino currently lives in Argentina and has earned his computer