Chapter 6. Building user-friendly forms using Flex formatters and validators

 

In this chapter, you’ll learn how to use the formatters and validators that make building data entry forms in Flex such a pleasure—well, at least compared to everywhere else. Flex formatters are used primarily to format data that’s being displayed to the user in controls like the DataGrid you saw in chapter 5. Flex formatters can also be used to take user input and turn it into correctly formatted input. Flex validators are used to validate user input and display validation messages when the user input isn’t correct.

The API documentation for formatters and validators is excellent in many regards; however, one area it has always been lousy at is showing how to use formatters and validators together on the same input controls that the user is using. There’s a good reason for this: it’s a bit tricky to do well! However, if you care about making your forms as usable as possible, this is the road you’ll inevitably end up going down. So, if you do, the time this chapter could save you should alone be worth the book price.

Ever since Flex 1.0, the support for formatting has been good, and the support for validation has been better. The biggest improvement since the early days of Flex is that validator classes can now have id properties and that you can bind to their properties. So, building apps that integrate formatting and validation on the same components is easier now than it once was.

Session 25. Formatters and validators

 
 
 

Session 26. Real-world forms, formatters, and validators

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest