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


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Development Guide >> Overview <=  =>      <  1  2  3  4  5  6  7  8  9  10  >  
Edit One/Many An overview to BEE website development

Edit One and Edit Many work the same way as View One and View Many.  (Edit None is usually not specified; discussed later.)  The easiest way to illustrate how they work is for you to click "For Editing" on the blue bar, and view them in the TEA editor (using the Code View).

Click on the TEA icon on the Edit layout page will bring you the TEA edit screen for it.  You simply enter all the fields as you do in View One.

The Edit layout (as different from the View layout) requires some buttons on a form.  However, BEE has done all those for you.  The buttons are in some system variables and it is up to you where to put them.  Also, there are no <form> tags required; all you need to enter are the fields and put the buttons where you want them.

The buttons are in the system variables {_updatebutton}, {_deletebutton} and {_addbutton}.  You may insert them anywhere in the layout, and they will come up as needed.  For example, you cannot delete records in the Edit Many layout, and therefore the {_deletebutton} is blank in Edit Many.  Likewise, the {_addbutton} will be blank unless it is on a new item form.

For record adding, you may reuse the Edit One and Edit Many layout by setting scheme%drb&NewRecordForm:one and/or scheme%drb&NewRecordForm:many to 1 (true).  In such case, after displaying the Edit One or Edit Many form, BEE will repeat the layout for one more record, marking it as new and show the {_addbutton} for you.

As mentioned before, there is no need to specify Edit None as it will simply use the Edit One layout showing {_addbutton}.  If you specify Edit None, the new record form will be substituted with your Edit None layout.  That means you cannot add a record without at least one of the NewRecordForm scheme variable (:one or :many) turned on.

For a new record form, there is another system variable to help you identify the form visually: {_new}, which contains the word "new" for the new item form, and blank for the edit form.  For example, you can enter the form heading as "{_new|propercase} Product Record".  (The BEE Conversion "propercase" is to convert "new" to "New" if it is there.)

Please note that all field names need to be succeeded by an underscore followed by the record key value.  For example, <input name=Price_{ID} value={Price}>.  Also, if you are writing JavaScripts in the layout, make sure all function names are succeeded with the same as well (e.g. function priceChanged_{ID} ...).  Basically, you may have multiple presentations on the page and therefore you need to make every construct named uniquely (even for Edit One).

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