Mihai Chira created FLEX-34941:
----------------------------------
Summary: Allow custom validators to use the triggerEvent
Key: FLEX-34941
URL: https://issues.apache.org/jira/browse/FLEX-34941
Project: Apache Flex
Issue Type: Improvement
Components: Validators
Affects Versions: Apache Flex 4.14.1
Reporter: Mihai Chira
Assignee: Mihai Chira
Priority: Minor
Fix For: Apache Flex 4.15.0
The private triggerHandler() function only starts validation, without storing
or using the event object. However, there are scenarios in which this object is
crucial. For instance:
There are two pathways to change the properties of an object: through a
DataGrid itemEditor, and through a form, which are side by side. As a user I
want to see in the grid when I have made an invalid change via the form.
One cannot just add validators to the itemEditors in the grid, because they
will not be instantiated if the changes happen via the form. But the red
rectangle and errorString properties still need to be set when the wrong values
are set.
A solution is to have the renderers dispatch a custom bubbling event when their
data changes, catch this event in a validator on the view that contains both
the grid and the form, and set the source and property dynamically on the
validator when this event occurs, so that it can effect the change to the
border and errorString of the renderer. For this, however, we need the event
object in triggerHandler.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)