Kbase P141644: How can I have a generic smartdatabrowse ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/19/2009 |
|
Status: Unverified
GOAL:
Create a generic SmartDataBrowse with predefined procedures, triggers,etc.
GOAL:
Use the same generic SmartDataBrowse for different SDO's
GOAL:
Try to not start from scratch the same SDB for each new SDO
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
FIX:
Using a copy of Sports2000 database, follow these steps:
1. Make a copy of src/adm2/dynbrowse.w to a new adm2 directory where you are testing. Rename it to DynamicBrowse.w. Add functions, procedures, triggers needed for the "master" SmartDataBrowse.
2. Create a SmartWindow using AppBuilder
3. Create a SDO and create a query selecting customers table and select fields (custnum, name). Save it as dcustomers.w
4. Create an instance of the SDO you just created on the smartwindow
5. Create a SDB by selecting the SDO icon on the palette and browse to your new ADM2 local directory where the DynamicBrowse.w is located and select it.
6. Add, create link from SmartDataObject h_dcustomers and click OK
7. Add, Create link to SmarDataObject h_dcustomers click OK
If this smartwindow is saved and executed the result will be a browse with custnum and name columns from customer table.
8. Try to create another SDO pointing to other table following steps 2-7 and just change the field names.
Whatever procedure, trigger or function you added to the SmartDataBrowse should be there when you reuse the "master" file using a different SDO pointing to any other table.