Data and ORDA
Listbox - DataClass Connection
A BWEB listbox connects directly to a 4D DataClass via htmlProperties.vt_TableName.
{"htmlProperties": {"vt_TableName": "SUPPLIER", "vt_DisplayListboxType": "fill", "vc_FieldDisplay": [{"vt_FieldName": "name", "vb_DisplayField": true}, {"vt_FieldName": "email", "vb_DisplayField": true}]}}
The initial query can be customized via vt_FirstRequest (ORDA query or JSON collection).
Custom DataClass Functions
Functions callable from BWEB are declared in DataClass classes with the pattern:
Function maFonction($vo_POST : Object)->$vo_WebResponse : cs.bspkComponent.WebFormController
// $vo_POST contains: vt_FieldValue (field values), triggerObject, etc.
var $wfc : cs.bspkComponent.WebFormController
$wfc:=cs.bspkComponent.WebFormController.new($vo_POST)
// ... business logic ...
$wfc.reloadBlock("maListbox")
$wfc.sendAlert("success"; "Operation successful")
return $wfc
Formulas
Listbox columns support formulas in vt_FieldFormula:
| Formula | Result |
|---|---|
| This.isPublished?"Published":"Draft" | Conditional text |
| This.firstName+" "+This.lastName | Concatenation |
| String(This.createdOn;"dd/MM/yyyy") | Date formatting |
REST API
BWEB exposes REST endpoints for interactions:
| Route | Description |
|---|---|
| /bweb/call-action | Server function call (button, form) |
| /bweb/get-block | Block reload |
| /bweb/upload | File upload |

