Is there any component that does handle validation errors similarly to ASP.NET's ValidationSummary control in flex? (See screenshot)
Component should really only display all the errors for the validator it watches.
I'm convinced I already used it but I was unable to find it anywhere in the doc.
-
Flex Validators work a bit differently than this but check out the Validator Samples in Tour de Flex.
tousdan : Yes, I know that they work differently than ASP's ones but my question is more if a component exists for my particular need.Eric Belair : Flex is very flexible when it comes to validators - you can call validators however you want, handle the results however you want, and even create your own custom validation.tousdan : I'm only trying to not to make a component for something that the framework already has. It seemed that my question wasn't clear enough. -
There is no component in Flex specifically designed to show a collection of all the validation errors in a form. Some built-in components have support for validation error indicators. TextInput, for instance, can display a red border with an error tooltip that appears on mouse roll over.
tousdan : I'll guess that i'll just have to write some kind of component for my own needs -
Well, I achieved the results I was expecting with a bit of work.
Sharing in the event that somebody has the same needs that I had ;-):
- Made a component that overrides validationResultHandler and manages validation errors
- Made sure that all the validators that had to be shown in the component had their listener property set to the component's instance
And thats pretty much it.
<my:ValidationView id="vv" /> <mx:StringValidator listener="{vv}" ... /> <mx:Validator listener="{vv}" ... />
0 comments:
Post a Comment