Join David Gassner for an in-depth discussion in this video Displaying validation errors with the Spark Form component, part of Flash Builder 4.5 and Flex 4.5 New Features.
The Spark Form container and its child object the FormItem now…handle validator display.…In this version of the application that you can import from the Validation.fxp…file in 03_spark, I've implemented a validator for the drop-down list.…Let's take a look at the code.…I'll go to Source mode and show you that there is an instance of the…NumberValidator class.…Its source property is set to ddlTours, that's the id of the drop-down list, and…the property to selectedIndex.…
The minValue has been set to 0, meaning that an item must be selected in the…drop-down list to be considered valid, and the LessThanMinError that would be…triggered if the value is negative one, that's the value of selected index if…nothing is selected. It gives me a message of Please select a tour.…And then I have added conditional code in the find_clickHandler here.…I'm getting an event object typed as ValidationResultEvent by calling the…validator object's validate method, and then examining its type and if it's…valid I'm changing the state and displaying the selected item.…
Recommended prerequisite: Flash Builder 4 and Flex 4 Essential Training.
- Coding with Quick Assist
- Using code completion on metadata tags and states
- Using new Design mode configuration and view capabilities
- Using the Spark versions of the DataGrid, Form, and Image components
- Creating a Flex project for Android applications
- Handling navigation in a view-based mobile application
- Using the Flash Catalyst CS5.5/Flash Builder 4.5 workflow
Skill Level Intermediate
ActionScript 3.0 in Flex Builder 2.0 Essential Trainingwith Joey Lott12h 46m Intermediate
Flex 4.5 and PHP: Creating Data-Driven Applicationswith Drew Falkman3h 36m Intermediate
1. Getting Started with Flash Builder 4.5
2. Using New Flash Builder Features
3. Using New Spark Components
4. Creating Mobile Flex Applications
Using the ActionBar3m 33s
5. Integrating with Flash Catalyst
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.