Cancel Events?


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

I'm looking for an easy and consistent way for a BO to notify the UI that an Add, Delete, Save, or Undo has been canceled. Having corresponding “Canceled” events to these methods would be one solution.  The event arguments would be similar to the existing After events except that a “message” item would need to be added to the Before and Canceled events to allow the developer to include a reason the method was canceled.

 

Currently I'm including logic in the form that I feel should really be in the BO because there is nothing in the framework (at least I haven't found it) to communicate to the UI that a method was cancelled in the BO and why. There may be a better way of doing this in the current framework that I haven’t thought of, and if so, I’m open to suggestions.

 

One other thing I noticed while thinking about this is that the BO Save methods are overridable while the Delete methods are not.  I’d like to see them marked overridable to allow the developer to extend them if necessary.  

 

-Larry

Reply
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
Marking the Delete methods as overridable is easy... we can certainly do that.  However, adding the functionality for a message and a cancel reason might be more than we want to support.  However, you could create an inherited BusinessLayer that has the proper functionality by overriding the OnBefore* methods and raising your own event rather than the base BusinessLayer event.  You could then raise a Cancelled event from the same place, right after you raise your own event if the Cancel has been set to true.
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