Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
110 Building user interaction As you can see, we made a few changes: imported the new Person class, modified the population of the dataProvider , and, the most important, changed the class used as renderer intheDataGroup.ThefinalresultisshowninFigure 2.9. The same mechanism applies to all the components that support data-driven rendering like DataGrid , List , ComboBox , etc. Validating data An important aspect of data visualization application is data entry. Whenever you want to update your data it is a good practice to check whether data entered by the user are "valid" with respect to the data model. For example, if we talk about personal information about a user we might requirethatnameandsurnamemustbeprovided.Thesame applies for more "formal" data like phone or credit card number, which have specific requirements. The Flex library comes with built-in validators that ease the task of developers when it's time to validate data entered by users. A validator usually checks a property of a component. In fact, Figure 2.9 datagroup with custom item renderers.