Chapter 9. DataView and ListView

 

This chapter covers

  • Learning about DataViews
  • Customizing the DataView rendering of data
  • Implementing a custom XTemplate
  • Exercising multicomponent event communication

Displaying lists of data in a web application is something that we’ve all had to deliver at one time or another in our careers. Whether it’s a list of books, servers on a particular subnet, or a list of employees, the process is the same. Retrieve the data; format and display it. Although this process is simple from a high level, the burden of maintaining the under-the-hood JavaScript has prevented us from being able to focus all of our attention on getting the task done. Throw in the ability to select multiple items, and you find yourself spending more time on maintenance than further developing your application.

In this chapter, you’ll learn that with the DataView you can achieve this goal easily, saving you time and allowing you to focus on the deliverables at hand. We’ll begin by constructing a DataView and introduce a major supporting class, the XTemplate, along the way. You’ll learn what it takes to properly configure the DataView for single or multiple Record selections.

Afterward, you’ll learn how to create a ListView to display data in a tabular format, much like the GridPanel. You’ll see what it takes to bind it to your implementation of the DataView to assist with the filtering of data from the DataView.

9.1. What is the DataView?

9.2. Constructing a DataView

9.3. Enter the ListView

9.4. Bringing it all together

9.5. Summary