Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
Matt

Although I have no experience in MVP, I can offer a possible suggestion.

The way that we achieve this within out framework is to encapsulate the rules within the concrete class and have a collection of 'BrokenRules' available to the client. For example, if you are constructing the class and it requires a date to be set, the 'Validate' method with the class can be called and this will add the rule to the collection. You can then check this collection or alternatively have a property of 'IsValid' which is set after the Validate method has been called. Although it does not tie into a specific control, you will have access to the rules that are broken and can display these within a generic control capable of displaying them.

This requires the use of a factory to build the object and have the associated code built in.

If this is something that may work for you, let me know and I can stick up some code.

Chris
Chris Bint, Oct 11, 2010
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas