IsValid and IsDirty from a child BO and CSLA version

IsValid and IsDirty from a child BO and CSLA version

Old forum URL: forums.lhotka.net/forums/t/2809.aspx


CSLABound posted on Wednesday, May 02, 2007

I'm using the CSLA framework from the C# Business Objects book (Apress).  When I tie a button's enable property to the IsVald && IsDirty property of a Root BO that has a Child BO, it does not seem to take notice of the Child's state, only the root.  I overrided the Parent BO to look at the Dirty and Valid property of the child Object as well.

Is this a common problem people have come across?  Also.... do I need to really upgrade my CSLA implementation to the latest and greatest?

Thanks for any and all feedback

ajj3085 replied on Wednesday, May 02, 2007

If you're using .Net 1.x, then you should probably be at Csla 1.53.  I believe thats the last version for that version of the framework.  I always prefer to keep up to date with Csla releases, but depending on the version you're using now, moving up may require some work as there are a few breaking changes.

If you overrode IsValid and IsDirty for the parent, your setup should be working fine.  (Csla 2 has an IsSavable property, which is simply IsValid && IsDirty).  I would check to make sure your child's state is really what you think it is, and trace into the IsDirty and IsValid of the parent and child.

Copyright (c) Marimer LLC