IntroductionAll fields share the same logic for building name and id attributes: - default behaviour is having the two values equal to
<db-name> [<row-id> ] - when multiplo attribute is set, then name becomes
<db-name> , while id keeps default behaviour - when js-name is set, then name becomes
<js-name> [<row-id> ] (or <js-name> ) - when js-id is set, then id becomes
<js-id> [<row-id> ]
<row-id> itself is computed this way:
- default behaviour is -1 for new fields (usa-id FALSE) and database row id for existing fields (usa-id TRUE)
- when valore-id is set and usa-id TRUE, then the value is the valore-id's value
UBK:CHECKBOXThis one represents a checkbox. When mode is R, the checkbox is displayed as: - a label, if attribute etichette is specified
- an image, if attribute img is specified
- a default label, else (Vero / Falso)
| attribute | required | default | domain | notes | | nome | X | | | the name of the database field | | mode | | environment | R, W, RW | tells the framework how to show the field: as a label, as a blank field, as a field filled with current value. Also the name of the field is affected by this property | | usa-id | | TRUE if mode = RW, FALSE if mode = W | TRUE, FALSE | tells the framework which id should be used to identify the field in the page: when FALSE, -1 is used, else valore-id if exists, else the current row-id | | valore | | '1' | mixed | the value of the field | | valore-id | | | mixed | the id value to be used to identify the field | | multiplo | | FALSE | TRUE, FALSE | if true, the field is not uniquely identified, but becomes part of an array | | js-name | | nome | | base part of the final html name attribute | | js-id | | nome | | base part of the final html id attribute | | diritti | | environment | array | Hash of type => [right => bool] containing current user rights. If no rights are presente, field is displayed in any case | | sezione | | environment | mixed | section of user rights to be used to check right needed to display the field. If no section is present, field is displayed in any case | | diritto | | mode | R, W, RW, D | the right needed to display this field, checked against current environment rights | | class | | environment | | the css class to be applied to the field; if mode is R, then the value is entagged in a span with that class, if img attribute is not set; defaul class check is always present | | etichette | | | string|string | labels for true and false values respectively to be shown if mode == R | | img | | | string | prefix name of a couple of images lying under img/ dir, called prefix SI DEF_IMG_EXT and prefix NO DEF_IMG_EXT used to represent the checkbox if mode == R (for example img/chkSI.png, img/chkNO.png) | | valore-default | | database field default value | | used only if mode is W | | tabindex | | environment | int | | | bloccato | | FALSE | TRUE, FALSE | if true, the field's html attribute disabled is set | | js-onclick | | | js | javascript code to be executed on click |
UBK:CHECKBOX-IMGThis one represents a graphical checkbox: it needs four images, representing the two states (checked, not checked) in two modalities (editing, reading). Those images should lie in a directory into img/, called for example chk/; then each image has for prefix the same name as the directory (chk), for suffix the four values SI, NO, SIR, NOR, for extension the one specified by DEF_IMG_EXT. You can define tons of graphical checkboxes with different appearence, putting those four images under different dirs. This class needs a javascript extension (CUbkCheckbox). | attribute | required | default | domain | notes | | nome | X | | | the name of the database field | | mode | | environment | R, W, RW | tells the framework how to show the field: as a label, as a blank field, as a field filled with current value. Also the name of the field is affected by this property | | usa-id | | TRUE if mode = RW, FALSE if mode = W | TRUE, FALSE | tells the framework which id should be used to identify the field in the page: when FALSE, -1 is used, else valore-id if exists, else the current row-id | | valore | | '1' | mixed | the value of the field | | valore-id | | | mixed | the id value to be used to identify the field | | multiplo | | FALSE | TRUE, FALSE | if true, the field is not uniquely identified, but becomes part of an array | | js-name | | nome | | base part of the final html name attribute | | js-id | | nome | | base part of the final html id attribute | | diritti | | environment | array | Hash of type => [right => bool] containing current user rights. If no rights are presente, field is displayed in any case | | sezione | | environment | mixed | section of user rights to be used to check right needed to display the field. If no section is present, field is displayed in any case | | diritto | | mode | R, W, RW, D | the right needed to display this field, checked against current environment rights | | class | | environment | | the css class to be applied to the image; default class check is always present | | img | X | | string | prefix name of images used to represent the checkbox | | alt | X | | string | alternate description for the checkbox-img | | valore-default | | database field default value | | used only if mode is W | | tabindex | | environment | int | | | bloccato | | FALSE | TRUE, FALSE | if true, the R version of images is used, and no javascript-change of the value is allowed | | js-onclick | | | js | javascript code to be executed on click |
UBK:CHECKBOX-FKThis one represents a checkbox that displays the presence of a related value to the current row in another place (table). | attribute | required | default | domain | notes | | nome | X | | | the name of the database field | | mode | | environment | R, W, RW | tells the framework how to show the field: as a label, as a blank field, as a field filled with current value. Also the name of the field is affected by this property | | usa-id | | TRUE if mode = RW, FALSE if mode = W | TRUE, FALSE | tells the framework which id should be used to identify the field in the page: when FALSE, -1 is used, else valore-id if exists, else the current row-id | | valore | | '1' | mixed | the value of the field | | valore-id | | | mixed | the id value to be used to identify the field | | multiplo | | FALSE | TRUE, FALSE | if true, the field is not uniquely identified, but becomes part of an array | | js-name | | nome | | base part of the final html name attribute | | js-id | | nome | | base part of the final html id attribute | | diritti | | environment | array | Hash of type => [right => bool] containing current user rights. If no rights are presente, field is displayed in any case | | sezione | | environment | mixed | section of user rights to be used to check right needed to display the field. If no section is present, field is displayed in any case | | diritto | | mode | R, W, RW, D | the right needed to display this field, checked against current environment rights | | class | | environment | | the css class to be applied to the image; default class check is always present, eventually as a span entagging labels | | tabella | X | | string | the table where the data should be searched | | campo-id-link | X | nome | string | the column of table where the data should be searched | | filtro | | | SQL | optional additional search condition (default and always present is campo-id-link = current_table.nome) | | img | | | string | prefix name of a couple of images lying under img/ dir, called prefix SI DEF_IMG_EXT and prefix NO DEF_IMG_EXT used to represent the checkbox if mode == R (for example img/chkSI.png, img/chkNO.png) | | tabindex | | environment | int | | | bloccato | | FALSE | TRUE, FALSE | if true, the field's html attribute disabled is set |
|