Now the validation is triggered by the view but you can forward the actual validation to the presentationModel instance who actually does the validation ... so the view only display the info that comes from the model and that's it...
C ________________________________ From: Borek <[email protected]> To: [email protected] Sent: Tuesday, April 14, 2009 7:25:47 PM Subject: [flexcoders] Re: Validation in Model (rather than in View) How does the Presentation Model pattern help? --- In flexcod...@yahoogro ups.com, claudiu ursica <the_braniak@ ...> wrote: > > Have a look a the presentaion model pattern maybe helps your cause... > > C > > > > > ____________ _________ _________ __ > From: Borek <bore...@... > > To: flexcod...@yahoogro ups.com > Sent: Tuesday, April 14, 2009 6:16:56 PM > Subject: [flexcoders] Validation in Model (rather than in View) > > > > > > Flex supports validation in the View layer quite well but the problem is that > the validation rules should not be there at all. They belong to Model but I'm > not sure how to implement that in Flex. > > I would like to be able to do something like this: > > [Required] > [String(minLength= "5")] > public var name : String; > > and then just have the TextInput in the View validated automatically. > Silverlight + .NET RIA Services can work like that but is that possible in > Flex where we don't have 2-way data binding? > > Thanks, > Borek >

