The renderer, or
is a powerful and commonly used aspect of the Flex Framework that enables
you to define components that will be used by data driven components to
display arrays or collections of data.
ComboBox containers among others,
use renderers, passing the data of each item in their
data provider to a specified
item renderer that then handles displaying and
updating the data. Because Flex applications frequently make extensive use
of tabular data and lists, understanding the most efficient way to display
data and to edit that data once displayed is an important aspect of
development with Flex.
The key to working with item renderers and item editors is understanding how the relationship between the
item renderer and the parent component is
defined by the Flex Framework. All item renderers must possess a
data property that can be used by the parent
component to set the relevant data item. How this data is displayed is
entirely up to the developer; for example, you can use a simple “drop-in”
item renderer or a custom component.
Item renderers can also allow user edits of data, which will automatically
data provider of the parent
item editor functions quite
differently, with the base
class creating an instance of the editor whenever an item renderer
component is clicked. When that editor loses focus, the
List attempts to read an
editorDataField property that can be ...