Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Grid Component


Previously, we were able to display our collection of celebrities with the help of the Loop component. It wasn't difficult, and in many cases, that will be exactly the solution you need for the task at hand. But, as the number of displayed items grow (our collection grows) different problems may arise.

We might not want to display the whole collection on one page, so we'll need some kind of a pagination mechanism and some controls to enable navigation from page to page. Also, it would be convenient to be able to sort celebrities by first name, last name, occupation, and so on. All this can be achieved by adding more controls and more code to finally achieve the result that we want, but a table with pagination and sorted columns is a very common part of a user interface, and recreating it each time wouldn't be efficient.

Thankfully, the Grid component brings with it plenty of ready to use functionality, and it is very easy to deal with. Open the ShowAll.tml template in an IDE...