Book description
Here are over 100 recipes for PrimeFaces, the ultimate JSF framework. It’s a great practical introduction to leading-edge Java web development, taking you from the basics right through to writing custom components.
- The first PrimeFaces book that concentrates on practical approaches rather than the theoretical ones
- Readers will gain all the PrimeFaces insights required to complete their JSF projects successfully
- Written in a clear, comprehensible style and addresses a wide audience on modern, trend-setting Java/JEE web development
In Detail
PrimeFaces is the de facto standard in the Java web development. PrimeFaces is a lightweight library with one jar, zero-configuration, and no required dependencies. You just need to download PrimeFaces, add the primefaces-{version}.jar to your classpath and import the namespace to get started. This cookbook provides a head start by covering all the knowledge needed for working with PrimeFaces components in the real world.
"PrimeFaces Cookbook" covers over 100 effective recipes for PrimeFaces 3.x which is a leading component suite to boost JSF applications. The book’s range is wide‒ from AJAX basics, theming, and input components to advanced usage of datatable, menus, drag & drop, and charts. It also includes creating custom components and PrimeFaces Extensions.
You will start with the basic concepts such as installing PrimeFaces, configuring it, and writing a first simple page. You will learn PrimeFaces' theming concept and common inputs and selects components. After that more advanced components and use cases will be discussed. The topics covered are grouping content with panels, data iteration components, endless menu variations, working with files and images, using drag & drop, creating charts, and maps. The last chapters describe solutions for frequent, advanced scenarios and give answers on how to write custom components based on PrimeFaces and also show the community-driven open source project PrimeFaces Extension in action.
Table of contents
-
PrimeFaces Cookbook
- Table of Contents
- PrimeFaces Cookbook
- Credits
- About the Authors
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Getting Started with PrimeFaces
-
2. 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
-
3. 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
-
4. 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
-
5. 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
-
6. 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
- 7. Working with Files and Images
-
8. 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
-
9. 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
-
10. 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
Product information
- Title: PrimeFaces Cookbook
- Author(s):
- Release date: January 2013
- Publisher(s): Packt Publishing
- ISBN: 9781849519281
You might also like
book
PrimeFaces Cookbook - Second Edition
Over 100 practical recipes to learn PrimeFaces 5.x ? the most popular JSF component library on …
book
Pro JSF and HTML5: Building Rich Internet Components, Second Edition
Pro JSF and HTML5 shows you how to leverage the full potential of JavaServer Faces (JSF) …
book
Jakarta EE Recipes: A Problem-Solution Approach
Take a problem-solution approach to programming enterprise Java applications and microservices for cloud-based solutions, enterprise database …
book
Practical JSF in Java EE 8: Web Applications in Java for the Enterprise
Master the Java EE 8 and JSF (JavaServer Faces) APIs and web framework with this practical, …