Unfortunately Validators in Flex 1.5 don't support binding in values
like your example. Instead, you need to programmatically create a
NumberValidator and update the maxValue property when maxVal changes.
Then you'll need to call the validator's doValidation function yourself
when you lose focus from the field you are validating.

In Flex 2.0, it is possible to bind in values to a validator's
properties.

Jason

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of KOT_MATPOC
Sent: Tuesday, May 02, 2006 2:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] NumberValidator dynamic binding problems

hi all,

I am using Flex 1.5 and trying to do something like that:

<mx:NumberValidator minValue="1" maxValue="{maxVal}" domain="int"
field="model.field"/>

I need to have maxValue attribute dynamically calculated as it might
change and I want my validator to know what is the current maxValue
for that field. However, this doesn't seem to work. I define a
variable maxVal, assign it a value, and bind it to the validator. But
it doesnt see it. If I hardcode it like that:

<mx:NumberValidator minValue="1" maxValue="8" domain="int"
field="model.field"/>

it works fine, but dynamic binding doesn't work here.

anyone has any suggestions? Thanks a lot





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to