Chapter 10. List customization

 

This chapter covers

  • The labelField property
  • Label functions
  • Overriding itemToLabel
  • Item renderers and editors
  • Combined item editor and item renderer
  • Advanced item renderers
  • Filter functions

In the previous two chapters, you learned about the various types of List-based components in Flex. In this chapter, you’ll build on this knowledge by learning how to customize these List-based components.

When it comes to visual Flex components, List-based components are typically the workhorses of a Flex or Adobe Integrated Runtime (AIR) application. Consequently, a large portion of development in Flex tends to focus on the presentation of, and interaction with, List-based components.

10.1. Customizing data display

In your Flex application development, it’s likely that at some point you will need a high level of control over the presentation of your list content beyond aesthetics. This includes adding interactive capabilities that enable the user to work with the content. The best way to start working with List-based components is by learning how to map data fields from a collection of objects such as an ArrayCollection or XMLListCollection and then learning how to manipulate that data with label functions. As you may have guessed, this is what you’ll be doing in the sections that follow.

10.1.1. The labelField property

10.2. Item renderers

10.3. Item editors

10.4. Advanced item renderers

10.5. Filter functions

10.6. Summary