by Tariq Ahmed et al.
22 March 2010
Flex 4 (Download trial)
Formatters are similar to validators, with the two often being used hand-in-hand to first validate data, then format any output to be displayed. Flex comes with a number of predefined formatters that can make your development chores easier. These Flex formatters have been specifically designed to handle data that typically comes from a back-end system, such as a database, but likely isn’t in a presentable format for the user to comfortably view.
Making use of formatters can be done in a number of ways, from real-time formatting that uses a static formatter, to ActionScript-based approaches that give you the flexibility to inject custom logic.
This chapter covers:
- Formatting raw data with Flex’s built-in formatters
- Types of formatters
- Real-time formatting and scripted formatting
- Dealing with formatting errors