Intercepting Save button bindings and data validation feedback.Intercepting Save button bindings and data validation feedback.
Old forum URL: forums.lhotka.net/forums/t/7731.aspx
tiptop posted on Tuesday, October 06, 2009
I have a WPF form and has a save button that is bound using CSLA. If a user changes any data, it becomes enabled and when I click "Save" it saves and disables itself.
Is there any way of getting feedback from the "save" action so that I can put a message on the screen to inform the user that the data has saved successfully? The same applies for creating a new record, if I don't display the ID field on the screen, the user does not know if the data has saved successfully apart from the "Save" button becoming disabled? If I show the ID field, then I can show the new ID to indicate that the data has saved successfully but this is not ideal.
Also for field validation, if a field fails validation, it just highlights with a different colour. There is no indication to the user why the validation has failed. Is there any way to intercept the validation check and display a message to the user?
These are usability issues that others users will have come across and I would like to know how you resolved the above issues.
I am using CSLA 3.7.
Thanks
MarkVinodonly replied on Tuesday, October 06, 2009
Save msg - Several ways to do this
1. Read in Book about saved event. U can hook up your handler and show appropriate msg once the even occurs.
2. Also chk globalcontext, localcontext etc. depending on your configuration, u can use those to pass values from bo to ui and vice versa..
WPF validation
complete example is given in book, chk propertystatus controll..
programatically u can get validation err msgs with brokenrules collection..tiptop replied on Tuesday, October 06, 2009
Thanks Vinod.
I will have another look at the book.
I had thought of the localcontext as a work around and using a property to indicate a change but would have thought there was a way of getting feedback from the "Save" method.
Copyright (c) Marimer LLC