Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setup Relationship between Business Objects (BO)
Message
 
À
11/08/2004 13:32:31
June Kendrick
Kendrick Associates, Inc.
New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00932054
Message ID:
00932474
Vues:
16
June,

MM has a class called 'clistobjedit' that is used for this type of purpose. This is a container class that lists the child records in a grid and also has built in buttons to 'Add, Edit and Delete' child records. It is used in conjunction for the the form based class 'clistobjeditform'. When you click on Add or Edit is launches this form so you can update the child values.

All of this is in the documentation and you can see it in action in the sample app (ProjMgr) delivered with MM. I currently have multiple live MM apps at multiple clients and these classes are a staple of all these apps. Once you get used to writing these forms, it becomes very easy to develop and deliver solid working applications. If you would like I can send you the documentation of one of these apps, which has screen shots of all forms. Just email me and I would be glad to send this to you if it would help.



>"In MM you must manually set the value of the foreign key in your code. One place where this is usually done is in the presavehook of the form class that is adding a child row. For example, if you're adding an order item (child) for an order (parent) do the following in the presavehook method of the form that is adding the child:"
>
>That's the part I was missing.
>
>Does the Dev. Guide cover handling parent/child relationships at all? I've been through it a few times, and haven't found anything yet, but maybe I just haven't been paying attention to the right sections.
>
>Is MM designed to have a separate form handle adding/editting of child relationships? I'm working on an app where there are only a few children per parent, and they don't have much data, so my preference is to have a grid for selection and to do the data editting/adding with a few text boxes below the grid, all on a page of the parent form. Is this not recommended with MM?
>
>Given how foreign keys are handled above (in the presavehook of the form), I can see where it gets complicated if the form is trying to deal with more than one updateable bizobj.
>
>Thanks,
>
>June
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform