IsDeleted in BusinessBase #4781
Replies: 2 comments 5 replies
-
|
This is a UI concern, and that's where I would handle this request. I presume that the same form also handles standard updates of properties? And I also presume that if they are able to start a new record or open a different record from the same UI, that they no longer need to see the deleted object? I don't know exactly how your binding works, but you could likely manage this with some custom code when saving. If the object is not deleted, you'll update the UI binding with the returned object. If the object is deleted, you update the UI binding with the instance of the object that has been marked as deleted, but not with the returned object, which we usually return in a "new" state. |
Beta Was this translation helpful? Give feedback.
-
|
In MVVM, they use INotifyPropertyChanged Interface to managed this type of UI/BL synch, but it only works because client server state is persistent. If your dealing with regular client server, you can implement that interface, or just create your own notification event stategy. Web is stateless, so for web you're going to have to manage that state in Javascript, using JQuery or some DHTML library to update the page's state, or just do a full postback. If you're dealing with HTML5,then I think you could potential use Websockets to do this too, but I've never done it that way. About the time HTML5 became a thing, I stopped doing UI completely, so I'm not much help. In any case, this is a UI concern, so it's outside the scope of middleware like CSLA. CSLA probably has an event notification model built into it (I havent looked at this codebase in detail in years), but that would only help you in client server solutions; however, it could aid you should you implement a Websockets solution. U can do it (it can be done for web [royal pain] and C-Server [easily with C-Server]), but the solution is different depending on your application's implementation. Good luck. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have IsDeleted property which indicates marked for deletion but I have a situation where after deleting a root object, users are asking to keep showing the deleted object's data on the UI.
But if users click on certain buttons, we need to inform that the object has already been deleted.
Do we have something built in Csla for this?
Kind Regards
Beta Was this translation helpful? Give feedback.
All reactions