Book Image

Mastering JavaServer Faces 2.2

By : Anghel Leonard
Book Image

Mastering JavaServer Faces 2.2

By: Anghel Leonard

Overview of this book

Table of Contents (20 chapters)
Mastering JavaServer Faces 2.2
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The JSF Life Cycle
Index

Chapter 6. Working with Tabular Data

Data that makes sense when displayed in a spreadsheet (or a tabular structure) is known as tabular data. In web applications, tabular data is commonly obtained from databases, where the data is natively represented in relational tables. The main JSF component for displaying tabular data is represented by the <h:dataTable> tag, which is capable of producing HTML classical tables. This chapter is a tribute to this tag, since tabular data is very commonly used and can be manipulated in many ways. Therefore, in this chapter, you will learn about the following topics:

  • Creating a simple JSF table

  • The CollectionDataModel class of JSF 2.2

  • Sorting tables

  • Deleting a table row

  • Editing/updating a table row

  • Adding a new row

  • Displaying a row number

  • Selecting a single row

  • Selecting multiple rows

  • Nesting tables

  • Paginating tables

  • Generating tables with the JSF API

  • Filtering tables

  • Styling tables

Note

This chapter focuses more on the tables that are populated with data that comes...