PrimeFaces Cookbook - Second Edition

Over 100 practical recipes to learn PrimeFaces 5.x – the most popular JSF component library on the planet

PrimeFaces Cookbook - Second Edition

Cookbook
Mert Çalışkan, Oleg Varaksin

3 customer reviews
Over 100 practical recipes to learn PrimeFaces 5.x – the most popular JSF component library on the planet
$35.99
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2017

With unlimited access to a constantly growing library of over 4,000 eBooks and Videos, a subscription to Mapt gives you everything you need to learn new skills. Cancel anytime.

Preview in Mapt

Book Details

ISBN 139781784393427
Paperback412 pages

Book Description

PrimeFaces is the most popular component library used in the JSF ecosystem. It is a lightweight library with one JAR, zero configuration, and no required dependencies.

This book covers over 100 effective recipes for PrimeFaces 5.2, which is a leading component suite to boost JSF-based applications. The book starts with an introduction to PrimeFaces and its concepts, such as AJAX processing, the selector mechanism, partial view submit, and i18n support. Later chapters then focus on theming and the usage of over 100 input and output components, such as tables, charts, menus, and so on.

This cookbook provides a solid foundation by covering all the knowledge needed to work with PrimeFaces components in the real world.

Table of Contents

Chapter 1: Getting Started with PrimeFaces
Introduction
Setting up and configuring the PrimeFaces library
AJAX basics with process and update
PrimeFaces selectors
Partial process and update with fragments
Partial view submit
Internationalization (i18n) and Localization (L10n)
Improved resource ordering
Chapter 2: Theming Concepts
Introduction
Understanding structural and skinning CSS
Installing themes
Customizing default theme styles
Adjusting the font and size throughout the web application
Simple ways to create a new theme
Stateless and stateful theme switchers
Integrating Font Awesome with PrimeFaces
Chapter 3: Enhanced Inputs and Selects
Introduction
Formatted input with inputMask
Auto suggestion with autoComplete
Usable features of inputTextArea
Discovering selectBooleanCheckbox and selectManyCheckbox
Choosing a single item with selectOneMenu
Basic and advanced calendar scenarios
Spinner – different ways to provide input
Slider – different ways to provide input
Rich text editing with the editor
Advanced editing with an in-place editor
Enhanced password input
Star-based rating input
Chapter 4: Grouping Content with Panels
Introduction
Grouping content with a standard panel
PanelGrid with colspan and rowspan support
Vertical stacked panels with accordion
Displaying overflowed content with scrollPanel
Working with a tabbed panel
Grouping of buttons and more with toolbar
The multipurpose output panel
Simulating the portal environment with dashboard
Creating complex layouts
Responsive layout with Grid CSS
Chapter 5: Data Iteration Components
Introduction
Selecting rows in dataTable
Sorting and filtering data in dataTable
In-cell editing with dataTable
Resizing, reordering, and toggling columns in dataTable
Making dataTable responsive
Using subTable for grouping
Handling tons of data – LazyDataModel
Listing data with dataList
Listing data with pickList
Listing data with orderList
Visualizing data with tree
Visualizing data with treeTable
Exporting data in various formats
Managing events with schedule by leveraging lazy loading
Visualizing data with dataScroller
Chapter 6: Endless Menu Variations
Introduction
Statically and dynamically positioned menus
Creating programmatic menus
The context menu with nested items
Integrating the context menu
Breadcrumb – providing contextual information about page hierarchy
SlideMenu – menu in the iPod style
TieredMenu – submenus in nested overlays
MegaMenu – the multicolumn menu
PanelMenu – hybrid of accordion and tree
MenuButton – multiple items in a popup
Accessing commands via menubar
Displaying checkboxes in selectCheckboxMenu
Chapter 7: Working with Files, Images, and Multimedia
Introduction
Basic, automatic, drag and drop, and multiple file uploading
Downloading files
Cropping images
Creating dynamic image streaming programmatically
Displaying a collection of images with galleria
Displaying a collection of images with imageSwitch
Displaying a collection of images with contentFlow
Embedding the multimedia content in JSF pages
Capturing images with photoCam
Chapter 8: Drag Me, Drop Me
Introduction
Making a component draggable
Restricting dragging by axis, grid, and containment
Snapping to the edges of nearest elements
Defining droppable targets
Restricting dropping by tolerance and acceptance
AJAX-enhanced drag and drop
Integrating drag and drop with data iteration components
Chapter 9: Creating Charts and Maps
Introduction
Creating line, area, bar, and pie charts
Creating combined charts
Updating live data in charts with polling
Interacting with charts via AJAX
Basic mapping with GMaps
Adding, selecting, and dragging markers in maps
Creating rectangles, circles, polylines, and polygons in maps
Enabling InfoWindow and streetView on maps
Chapter 10: Client-side Validation
Introduction
Configuring and getting started with CSV
Instant validation with p:clientValidator
Bean Validation and transformation
Extending CSV with JSF
Extending CSV with Bean Validation
Chapter 11: Miscellaneous Advanced Use Cases
Introduction
Programmatic updating and scrolling with RequestContext
Two ways of triggering the JavaScript execution
Adding AJAX callback parameters – validation within a dialog
Opening external pages in dynamically generated dialogs
Polling – sending periodical AJAX requests
Blocking page pieces during long-running AJAX calls
Controlling form submission using defaultCommand
Clever focus management in forms
Layout pitfalls of menus and dialogs
Targetable messages with severity levels
Conditional coloring in dataTable
Sticking a component when scrolling
Reducing page load time using content caching
Possibilities for exception handling in PrimeFaces

What You Will Learn

  • Understand basic concepts such as AJAX processing and partial view submit so that you can work with PrimeFaces
  • Go beyond the basics and discover more interesting features of PrimeFaces: PrimeFaces selectors, RequestContext, Dialog Framework, and more
  • Delve deep into over 100 rich UI components with all the required details
  • Get practical solutions to complex problems that arise in a JSF ecosystem
  • Use best practices, avoid pitfalls, and get performance tips when working with the component suite

Authors

Table of Contents

Chapter 1: Getting Started with PrimeFaces
Introduction
Setting up and configuring the PrimeFaces library
AJAX basics with process and update
PrimeFaces selectors
Partial process and update with fragments
Partial view submit
Internationalization (i18n) and Localization (L10n)
Improved resource ordering
Chapter 2: Theming Concepts
Introduction
Understanding structural and skinning CSS
Installing themes
Customizing default theme styles
Adjusting the font and size throughout the web application
Simple ways to create a new theme
Stateless and stateful theme switchers
Integrating Font Awesome with PrimeFaces
Chapter 3: Enhanced Inputs and Selects
Introduction
Formatted input with inputMask
Auto suggestion with autoComplete
Usable features of inputTextArea
Discovering selectBooleanCheckbox and selectManyCheckbox
Choosing a single item with selectOneMenu
Basic and advanced calendar scenarios
Spinner – different ways to provide input
Slider – different ways to provide input
Rich text editing with the editor
Advanced editing with an in-place editor
Enhanced password input
Star-based rating input
Chapter 4: Grouping Content with Panels
Introduction
Grouping content with a standard panel
PanelGrid with colspan and rowspan support
Vertical stacked panels with accordion
Displaying overflowed content with scrollPanel
Working with a tabbed panel
Grouping of buttons and more with toolbar
The multipurpose output panel
Simulating the portal environment with dashboard
Creating complex layouts
Responsive layout with Grid CSS
Chapter 5: Data Iteration Components
Introduction
Selecting rows in dataTable
Sorting and filtering data in dataTable
In-cell editing with dataTable
Resizing, reordering, and toggling columns in dataTable
Making dataTable responsive
Using subTable for grouping
Handling tons of data – LazyDataModel
Listing data with dataList
Listing data with pickList
Listing data with orderList
Visualizing data with tree
Visualizing data with treeTable
Exporting data in various formats
Managing events with schedule by leveraging lazy loading
Visualizing data with dataScroller
Chapter 6: Endless Menu Variations
Introduction
Statically and dynamically positioned menus
Creating programmatic menus
The context menu with nested items
Integrating the context menu
Breadcrumb – providing contextual information about page hierarchy
SlideMenu – menu in the iPod style
TieredMenu – submenus in nested overlays
MegaMenu – the multicolumn menu
PanelMenu – hybrid of accordion and tree
MenuButton – multiple items in a popup
Accessing commands via menubar
Displaying checkboxes in selectCheckboxMenu
Chapter 7: Working with Files, Images, and Multimedia
Introduction
Basic, automatic, drag and drop, and multiple file uploading
Downloading files
Cropping images
Creating dynamic image streaming programmatically
Displaying a collection of images with galleria
Displaying a collection of images with imageSwitch
Displaying a collection of images with contentFlow
Embedding the multimedia content in JSF pages
Capturing images with photoCam
Chapter 8: Drag Me, Drop Me
Introduction
Making a component draggable
Restricting dragging by axis, grid, and containment
Snapping to the edges of nearest elements
Defining droppable targets
Restricting dropping by tolerance and acceptance
AJAX-enhanced drag and drop
Integrating drag and drop with data iteration components
Chapter 9: Creating Charts and Maps
Introduction
Creating line, area, bar, and pie charts
Creating combined charts
Updating live data in charts with polling
Interacting with charts via AJAX
Basic mapping with GMaps
Adding, selecting, and dragging markers in maps
Creating rectangles, circles, polylines, and polygons in maps
Enabling InfoWindow and streetView on maps
Chapter 10: Client-side Validation
Introduction
Configuring and getting started with CSV
Instant validation with p:clientValidator
Bean Validation and transformation
Extending CSV with JSF
Extending CSV with Bean Validation
Chapter 11: Miscellaneous Advanced Use Cases
Introduction
Programmatic updating and scrolling with RequestContext
Two ways of triggering the JavaScript execution
Adding AJAX callback parameters – validation within a dialog
Opening external pages in dynamically generated dialogs
Polling – sending periodical AJAX requests
Blocking page pieces during long-running AJAX calls
Controlling form submission using defaultCommand
Clever focus management in forms
Layout pitfalls of menus and dialogs
Targetable messages with severity levels
Conditional coloring in dataTable
Sticking a component when scrolling
Reducing page load time using content caching
Possibilities for exception handling in PrimeFaces

Book Details

ISBN 139781784393427
Paperback412 pages
Read More
From 3 reviews

Read More Reviews