Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using view parameters with a pageframe
Message
De
06/05/1999 09:38:17
 
 
À
06/05/1999 08:59:38
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00215514
Message ID:
00215685
Vues:
21
>>I just don't understand why you have three BizObjs/Views/Pages if it is the same data/table that you are presenting.
>
>My stupidity maybe? :)
>

Well, I understand the need for pages if a record contains to much data to fit on one page. Is all the data in the same record?

>What I ended up doing is putting the following in each page activate.
>
>Thisform.oBizObj.AddViewParameter('vp_NotesType',"'general'")
>Thisform.oBizObj.AddViewParameter('vp_LastNote','DTOC(Date())')
>Thisform.oBizObj.AddViewParameter('vp_ReadStatus',"'N'")
>Thisform.oBizobj.Requery()
>
>The parameters are different in each of course. Is this the correct way to do this - OOP wise?
>
>Thanks to the both of you for your help.

Well... I don't understand your design... but, when moving from page to page, why are you requerying? It sounds to me like all the data is in the same record.

I don't think you want to do it the above way... what you want to do is specify the view paramaters to the framework, then just requery when you need to. Or, in your page activate you can just assign the values to the vp's:

vp_NotesType = 'general'
vp_LastNote = DTOC(Date())
vp_ReadStatus = 'N'
Thisform.Requery()

Also, I thing you should call the form's requery... this will handel locking the screen before and refreshing the screen after the requery.

BOb

**********

the idea of using view parameters is that you have an object on your screen that is going to be used to populate the view parameter... for example, lets say you have a customer file and you want the user to be able to get at their record via the customers ID...

You would put a text box on the form where the user enters the cust id.. then, in the valid of that control you would call thisform.requery().

In the PostInitHook of the BizObj you would have done...

this.AddViewParameter('vp_cCustID','thisform.txtCustID.value')

What the framework would do, ever time you requery the biz obj it would put the value of the text box into the view parameter.

************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform