ReadOnly Object?


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Having IsDirty always return False for a ReadOnly object would make it much easier to achieve the functionality I'm looking for. Thanks!
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Having a ReadOnly property would be nice. At the top of the Save(), we bail out if the business object is not dirty, so we could configure the IsDirty property to always return false on a ReadOnly business object. I would tell you to just ignore the changes and not save the business object, but when you call Save() on the form, it saves all of the business objects no matter what, so, I'll look into this.



ED: I'll do my best to get this included along with the warnings implementation in the next version.
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Unlike some other frameworks, StrataFrame, uses a single business object type and I’m wondering what would be the best way handle the following situation where a read only object would be helpful.  Using the sample application I’m emulating a publisher/subscriber pattern using events.  On the OrderEntry form the CustomerBO would not normally be updated. However since I’ve added an event handler to display any changes to Customer made on the CustomerMaint form it does get updated and IsDirty is set to True. However I don’t want to save the changes, since they were already saved by the CustomerMaint form.  In CSLA I would have used a ReadOnly CustomerBO on the OrderEntry Form. One solution would be to add a ReadOnly property to the base BO so that IsDirty would not be set to True no matter what changes were made.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search