This worked perfectly (with some adaptation). Thanks a lot!
--
Pablo Apanasionek
-----Mensaje original-----
De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de Doug Lowder
Enviado el: MiƩrcoles, 31 de Mayo de 2006 13:47
Para: flexcoders@yahoogroups.com
Asunto: [flexcoders] Re: Flex 1.5 :: Disabling multiple validators of a Model
The following made validator ebnabling/diabling a bit easier to deal
with for me:
// Reset the validation model.
for (var tagname in myValidationModelId) {
var vObjName: String = "myValidationModelId." + tagname;
Validator.disable(this, vObjName);
Validator.enable(this, vObjName);
}
--- In flexcoders@yahoogroups.com, "Pablo Apanasionek"
<[EMAIL PROTECTED]> wrote:
>
> Fellows Coders,
>
> how can I enable/disable a set of validators of a Model without
doing it
> individually for each of one?
>
> E.g.
>
> <mx:Model id="ModelTest">
> <oneProp>{oneText.text}</oneProp>
> <twoProp>{twoText.text}</twoProp>
> </mx:Model>
>
> <mx:StringValidator field="ModelTest.oneProp" required="true" />
> <mx:StringValidator field="ModelTest.twoProp" required="true" />
>
> In some function:
>
> mx.validators.Validator.enable(this, 'ModelTest.oneProp');
> mx.validators.Validator.enable(this, 'ModelTest.twoProp');
> ...
> validate/clear fields
> ...
> mx.validators.Validator.disable(this, 'ModelTest.oneProp');
> mx.validators.Validator.disable(this, 'ModelTest.twoProp');
>
> Question is: is there any way to replace this enabling/disabling
with
> another more efficient/scalable way?
>
> Thanks in advance!
> --
> Pablo Gustavo Apanasionek
>
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.