TEAPOT
Username:  
Password:
  > Home
> User Guide
> Reference
> Portal Object
v Development Guide
    o Overview
    > A Typical Page (C)
    v Data Handling
       o TEACUP
       o TEAPOT
    > Applications
    > Working BEE


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Development Guide >> Data Handling >> TEAPOT <=  =>      <  1  2  3  4  >  
The Text-Edit-Area Presented Object Template

To turn on the TEAPOT feature, all you need to do is to define the scheme file "teapot" (scheme%teapot&).  At the moment, the only object to present is data records.  In the "teapot" scheme file, only one variable is needed: DatabaseObject.  For example, if you have

DatabaseObject=dbo

then scheme%dbo& contains the database object defination.  Here is an example:


table=Product

keyfield=ID

encode:IssuedDate=strtotime
decode:IssuedDate=strftime:%d-%b-%Y

match:Name=substr
match:IssuedDateFrom=min:IssuedDate
match:IssuedDateTo=max:IssuedDate
match:PriceFrom=min:Price
match:PriceTo=max:Price
match:RecordPath=rlike

Default:RecordPath={_recordpath}

rpp:view=5
ppb:view=10
rpp:edit=10
ppb:edit=10


The first part is the database object (dbobj) initialisers.  The other part starting from Default is for the Data Record Browser (DRB).

The variable "rpp" stands for "records per page" and "ppb" "pages per block".  (Block loosely means the navigation bar.)

There are two modes: "view" and "edit".  Mode "view" is for the visitor to display data records from, say, a search result, and mode "edit" is for the "data editor" to update data records in the database.

There are two quantities: "one" and "many".  Quantity "one" means the layout contains only one data record, and quantity "many" is for multiple data records.

So instead of only one layout as in TCB, you have four layouts in DRB: "view one", "view many", "edit one" and "edit many".

The designer specifies the layout with the curly bracketed variables (e.g. {Price}).  Any applications that process those values should get it from session%teapot:var.  For example, session%teapot:Price contains the Price value of the data record after a "view one" page is shown.

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd