Information générale
Catégorie:
The Mere Mortals Framework
>Hi everybody
>
>I have dropped pageframe(page count 3) on a form and dropped a bizobj on all three pages. All the bizobj use the same view, but with different parameters. I put the addviewparameters stuff in each bizobj's postinithook(). I put the Thisform.oBizobj.Requery() in each page's activate. The problem is that the view parmaeters don't get set until after the requery() so as I tab through the pages, I get the data from the previous page. I know I am probably putting the addviewparameter statements in the wrong place, so where do I put them so that they will be in scope before the requery()?
>
>TIA
>
>Version 4.01 of the framework.
You did everything correctly as far as I can see, except you need to check the property lAutoPrimarybizobj. This should be set to .T. As each page is activated, your code, Thisform.oBizobj.Requery(), doesn't know which bizobj to requery, so it requeries the first bizobj that is activated when the form instantiates. This is the bizobj that the form thinks is the primary bizobj. As each page is activated, you need to make the bizobj on that page the primary bizobj so that the form's requery method will know which object to requery. Setting the property, lAutoPrimarybizobj, will take care of that for you.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement