Would you recommend an Action Condition for this?

Topics: CAB & Smart Client Software Factory
Dec 15, 2006 at 10:25 AM
originally posted by: rayn

I have a form that has two toolbar options:
1. Save (to save the changed data but continue to work in the form)
2. Save and Close (to save the data and close the form)

I can write a loosely coupled event to perform the save action, but, assuming the user clicks "save and close", I need to know if the save was successful before I close the form.

Therefore, I was wondering, if this would be my best option:
Create a save action with no conditions* and within my Action "SaveForm", I'll return a bool true in the "object target" parameter if the save is successful.

That way, I can save the data and have a way to keep the form up in case the save fails.

I'm pretty sure this will work for me, but it seems a little convoluted.

Can someone tell me if this is the best/right way to do it?

I'm open to ideas. Well, except for "remove the Save & Close button" :)


*I'm not creating any conditions b/c I don't need them yet.