PacktLib: PrimeFaces Cookbook

PrimeFaces Cookbook

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Getting Started with PrimeFaces

Introduction

Setting up and configuring the PrimeFaces library

AJAX basics with Process and Update

Internationalization (i18n) and Localization (L10n)

Improved resource ordering

PrimeFaces scaffolding with Spring Roo

Theming Concept

Introduction

Understanding the structural and skinning CSS

Installing themes

Customizing theme styles

Customizing default styles on input components

Adjusting the font and size throughout the web application

Why does the theme look different in Internet Explorer?

Simple ways to create a new theme

Default stateless theme switcher

Alternative stateful theme switchers

Enhanced Inputs and Selects

Introduction

Formatted input with inputMask

Auto suggestion with autoComplete

Usable features of inputTextArea

Discovering selectBooleanCheckbox and selectManyCheckbox

Basic and advanced calendar scenarios

Spinner – different ways to provide input

Slider – different ways to provide input

Rich text editing with editor

Advanced editing with in-place editor

Enhanced password input

Star-based rating input

Grouping Content with Panels

Introduction

Grouping content with a standard panel

Panel grid 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

Simulating the portal environment with dashboard

Creating complex layouts

Data Iteration Components

Introduction

Selecting rows in dataTable

Sorting and filtering data in dataTable

In-cell editing with dataTable

Conditional coloring in dataTable

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

Visualizing data with carousel

Visualizing data with ring

Endless Menu Variations

Introduction

Static and dynamic positioned menus

Creating a programmatic menu

Context menu with nested items

Context menu integration

SlideMenu – menu in iPod style

TieredMenu – submenus in nested overlays

MegaMenu – multicolumn menu

PanelMenu – hybrid of accordion and tree

Accessing commands via Menubar

Displaying checkboxes in SelectCheckboxMenu

Dock menu for Mac OS fans

Working with Files and Images

Introduction

Basic, automatic, and multiple file upload

Uploading a file with drag-and-drop

Downloading files

Cropping images

Displaying a collection of images

Capturing images with photoCam

Comparing images

Drag Me, Drop Me

Introduction

Making a component draggable

Restricting dragging by axis, grid, and containment

Snapping to the edges of the nearest elements

Defining droppable targets

Restricting dropping by tolerance and acceptance

AJAX-enhanced drag-and-drop

Integrating drag-and-drop with data iteration components

Creating Charts and Maps

Introduction

Creating a line chart

Creating a bar chart

Creating a pie chart

Creating a bubble chart

Creating a donut (doughnut) chart

Creating a meter gauge chart

Creating an OHLC chart

Updating live data in charts with polling

Interacting with charts through AJAX

Creating dynamic image streaming programmatically

Mapping with Google Maps

Miscellaneous, Advanced Use Cases

Introduction

The power of the PrimeFaces selectors

Programmatic updating and scrolling with RequestContext

Two ways to trigger JavaScript execution

Adding AJAX callback parameters – validation within a dialog

Navigating to another page in AJAX calls

Polling – sending periodical AJAX requests

Blocking page pieces during long-running AJAX calls

Remembering current menu selection

Controlling form submission by DefaultCommand

Clever focus management in forms

Layout pitfalls with menus and dialogs

Targetable messages with severity levels

Leveraging Schedule's lazy loading feature

Index