[ 
https://issues.apache.org/jira/browse/FLEX-14177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Mclean updated FLEX-14177:
---------------------------------

    Labels: easyfix easytest  (was: )
    
> The field property of ValidationResultEvent is never set (at least for base 
> Validator class)
> --------------------------------------------------------------------------------------------
>
>                 Key: FLEX-14177
>                 URL: https://issues.apache.org/jira/browse/FLEX-14177
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Validators
>    Affects Versions: Adobe Flex SDK 3.0 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Browser: Firefox 2.x
> Language Found: English
>            Reporter: Adobe JIRA
>            Priority: Minor
>              Labels: easyfix, easytest
>
> Steps to reproduce:
> 1. Create a new application and paste this code:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
>       <mx:TextInput id="fieldName" name="Name" text="erase this text..."/>
>       <mx:Validator id="validatorName" source="{fieldName}" 
>               property="text" required="true" triggerEvent="change"
>               
> invalid="mx.controls.Alert.show(ValidationResultEvent(event).field)"/>
> </mx:Application>
> 2. Run the application and delete the text in the field.
>  
>  Actual Results:
> The alert box display the text "null", because the field property of 
> ValidationResultEvent is not set.
>  
>  Expected Results:
> The alert box should display the field name.. as far as I understood, it 
> should display the text "Name". 
> Documentation for mx.events.ValidationResultEvent says the this property is 
> "The name of the field 
> that failed validation and triggered the event".
>  Workaround (if any):
> None.
> I looked at the source code of the framework, and the ValidationResultEvent 
> in case of an invalid
> result is created in the handleResults() method of the Validator class - the 
> "field" property is never 
> set, and the constructor of ValidationResultEvent defaults it to null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to