StrataFrame Forum

Maint Form Undo Button

http://forum.strataframe.net/Topic454.aspx

By Larry Caylor - 1/18/2006

On a SF Maint Form, does clicking the Undo button call the Maint form’s undo method or the primary business object’s undo method? I have a Maint form with two business objects that have a parent-child relationship. Undo is working on the parent but not the child and I believe it’s because the Undo button only calls the parent’s (primary object) undo method. If so I know how to get the behavior I want, I just want to make sure I understand what is going on.

-Larry

By Gary C Wynne - 1/19/2006

Hi Larry

Take a look at the "IncludeInFormUndoType" property on the form. This can be combined with a counterpart property on the BO called "IncludeInFormUndo". Basically, you can have the "Undo" action applied to the PrimaryBO, AllBOs or determined by BOs that have their IncludeInFormUndo property set true.

This logic can be applied to all other "actions" like Save, Edit, Delete, New, Navigate etc.,

HTH

-=Gary

 

 

By StrataFrame Team - 1/19/2006

Larry,



Once again, Gary is correct Smile



If your form doesn't have the IncludeInFormType options, you'll have to download the latest version.
By Gary C Wynne - 1/19/2006

Hey Ben

The "states" enhancement sure is resolving quite a few issues Wink

What a great idea ! Cool

By Larry Caylor - 1/19/2006

Gary,

 

Thanks for the info. I was aware of the BO property “IncludeInFormUndo” but missed its counterpart  ‘IncludeInFormUndoType” at the form level. I gave this combination a try but it didn’t produce the exact result I was looking for. My child object is being displayed in a ListView on the maint form and is being refreshed in the ‘EditingStateChanged” event handler for the form. When I click Undo on the form the old values are not being reflected in the ListView and I’m assuming that is due to the order in which events are raised. “EditingStateChanged” is probably being raised before “Undo” on the child object.  I can get the desired result by calling Undo on the child object in the “BeforeUndo” event handler on the form or refreshing the ListView in the “EditingStateChaged” event handler of child object.

 

StrataFrame provides a lot of options and therefore presents a definite learning curve, but I’m finding the more I work with it the more I like it.

 

-Larry

By Gary C Wynne - 1/19/2006

Hi Larry,

 

>Thanks for the info.

 

No problem.

 

>I was aware of the BO property “IncludeInFormUndo” but missed its counterpart  ‘IncludeInFormUndoType” at the form level. I gave this combination a try but it didn’t produce the exact result I was looking for.

 

Well, it should allow the Undo to occur on the child BO. As to the list not reflecting the changes, it needs refreshing, as you have established.

 

>or refreshing the ListView in the “EditingStateChaged” event handler of child object.

 

I would have thought that the logical place to refresh the List is in the AfterUndo event handler (for either the BO in question or the form). Refreshing in the "EditingStateChanged" event will mean some kind of conditional testing to ensure that you only refresh the list when you can detect an Undo action has occured. If you use AfterUndo, particularly using a BO specific handler, you can safely Refresh the list and know that you are doing it at exactly the right time/place/right BO.

 

>StrataFrame provides a lot of options and therefore presents a definite learning curve,

 

There is a learning curve with most tools but its fun learning Smile

 

>but I’m finding the more I work with it the more I like it.

 

That's all that matters. I find SF intuitive and very productive.

 

HTH

 

Best

 

-=Gary

By Michael R Poirier - 10/11/2011

I would like to put a check box on the SF browse dialogue to allow the filter of only records with a true or false in a bit type field.  Can't seem to make it work.
By Ivan George Borges - 10/12/2011

Hi Michael.

Choose the Combo-Enum tab in the Search Field Criteria dialog and set it to an enum that you will create with your False/True statements.