That's a UI concern, which is to say that the presentation layer (in code-behind or a ViewModel or a Controller) needs to deal with this.
What that means in a practical sense, is that the button's Click event needs to trigger some code that pops up the confirmation dialog. That code can be in the code-behind, a ViewModel, a Controller, a Presenter or whereever is appropriate based on your presentation layer architecture).
In CSLA 3.8 I'm enhancing InvokeMethod so you can easily route the Click event to a method on any object, making this easier (hopefully).
In CSLA 3.6/3.7 you almost certainly have to write a Click event handler in code-behind, which can either do the work, or call another object that does the work.
Hi Rocky,
Would you please supply an example of how to do this with bxf and csla 4.1 for silverlight? I've been looking for a sample in csla 4.1 samples but I couldn't find anything similar. How does an EditViewModel know if another DeleteConfirmViewModel has been accepted or canceled?
Oscar.
This thread in the Bxf forum might be useful to you
Thank you Rocky. But I can't find any sample of delete confirmation or something similar. What's the name of the bxf sample you are talking about in the codeplex discussion? Is it UsingBxfNav.sln? In this sample, an errorWindow is shown, but the user doesn't make any decision between Yes or Not that the application had to consider later. Do you think it's better that I post my question in bxf codeplex forum?
This is a Bxf question, and so does belong in that forum, yes.
I was referring to UsingBxfNav. It doesn't show delete confirmation, but does show display of a dialog window. In some thread I also talk about having the original viewmodel maintain a reference to the viewmodel provided to the dialog, so when the dialog is closed, that dialog viewmodel will have the result, and therefore the original viewmodel can access the result. The original viewmodel typically has to listen for a PropertyChanged (or other) event on the dialog viewmodel so it knows when the dialog result is available.
Copyright (c) Marimer LLC