StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



StandardForm and BO IncludeInFormEditExpand / Collapse
Author
Message
Posted 08/11/2006 2:04:02 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 02/04/2008 8:43:02 AM
Posts: 176, Visits: 1,519
I have two BOs on a form,  B1 and B2.  B1 is the primary BO of the form, I have set the IncludeInFormEdit to TRUE on B2.  When I call this.Edit() only the fields that are bound to B1 go into edit mode, B2 fields only go into edit mode if I directly call the Edit method of B2.  Am I missing something here?

Also if I change the data in one of the field and then use the BrowseDialog to select a new record there is no message to save the changes before switching records.  What method must I call so that the user will be prompted to save any changed data?  If you close the form without saving any changes the user is automatically prompted, I want to duplicate this beheavior.  Should I just check the isDirty property of the BO and prompt with my own message?

Post #2160
Posted 08/11/2006 4:11:58 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
As for your first question, Scott, there is a corresponding property on the form called IncludeInFormEdit that accepts an enum value.  By default, it is set to PrimaryBusinessObject which is why only your B1 is editing.  There are two other values that you can set that property to: DeterminedByBusinessObject and AllBusinessObjects.  If you set it to AllBusinessObjects, then all business objects on the form, will be edited when you call Edit() on the form.  The DeterminedByBusinessObject property is the one that will use the individual IncludeInForm properties on the business objects to determine whether the business objects will be included in the edit.  So, you'll need to set the property on the form to DeterminedByBusiness object for it to test that Boolean property on the business objects.


www.bungie.net
Post #2168
Posted 08/11/2006 4:14:35 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
As for the second question, you'll need to do wht you said, and test the IsDirty() property of the business object before you show the BrowseDialog.

The best thing would probably be to go through the business objects in the Form.GetListOfSaveBOs(), which will return an array of the business objects that will be included in the save. If any of them are dirty, then show the message and handle the logic accordingly.


www.bungie.net
Post #2169
Posted 08/11/2006 4:33:28 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: Forum Members
Last Login: 02/04/2008 8:43:02 AM
Posts: 176, Visits: 1,519
I knew I had to be missing something.  Thanks
Post #2171
Posted 08/11/2006 4:42:08 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 2 days ago @ 5:02:56 PM
Posts: 2,682, Visits: 1,882
No problem


www.bungie.net
Post #2172
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 4:24pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 13 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.