Table Item
Table Widget ********************** https://trac.smartms.streamwide.com/wiki/22/Backend_Spec_221/Storage_Template_JSON_Structure#table https://trac.smartms.streamwide.com/wiki/24/Backend_Spec_244/ClientServerProtocol_Table_Calculation#Tablewidget
JSON Structure: { "type": "table", "uuid": "c61398d8-cfa4-4e61-b2f7-5ce26753c9cc", "label": "Single header table", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 0, "startColumn": 0, "columnSpan": 6 }, "hasValue": true, "unsupportedTypeValue": [], "conditionalDisplay": null, "calculate": null, "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "firstColumn": { "number": false, "rows": [] }, "subType": "single", "maxRows": 0, "columns": { "type": "number", "uuid": "ff627312-a0a3-4240-886e-284c51007867", "label": "Number", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 0, "startColumn": 0, "columnSpan": 6 }, "defaultValue": "0.00", "hasValue": true, "unsupportedTypeValue": "0.00", "conditionalDisplay": null, "calculate": null, "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "format": { "decimals": 2, "decPoint": ".", "thousandsSep": "" } }, { "type": "currency", "uuid": "e1a00c4d-a12a-46ff-ae4e-c02846942fe1", "label": "Currency", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 1, "startColumn": 0, "columnSpan": 6 }, "defaultValue": { "currency": "USD", "value": "" }, "hasValue": true, "unsupportedTypeValue": { "currency": "USD", "value": "" }, "conditionalDisplay": null, "calculate": null, "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "modifyCurrency": false, "format": { "decPoint": ".", "thousandsSep": "", "decimals": 2 } }, "footer": [{ "type": "number", "uuid": "5765b5af-4c0c-4b82-93c6-ff3c17955859", "label": "Number", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 0, "startColumn": 0, "columnSpan": 6 }, "defaultValue": "0.00", "hasValue": true, "unsupportedTypeValue": "0.00", "conditionalDisplay": null, "calculate": { "type": "operand", "valueType": "widget", "value": "", "formula": { "formulaType": "tableColumnSum", "parameters": { "tableUuid": "c61398d8-cfa4-4e61-b2f7-5ce26753c9cc", "columnUuid": "ff627312-a0a3-4240-886e-284c51007867" } } }, "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "format": { "decimals": 2, "decPoint": ".", "thousandsSep": "" }, "displayPosition": { "bottomWidgetType": "column", "widgetUuid": "ff627312-a0a3-4240-886e-284c51007867" } }, { "type": "currency", "uuid": "fdad89e6-48aa-47c8-ac6d-db56ef34b42b", "label": "Currency", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 1, "startColumn": 0, "columnSpan": 6 }, "defaultValue": { "currency": "USD", "value": "" }, "hasValue": true, "unsupportedTypeValue": { "currency": "USD", "value": "" }, "conditionalDisplay": null, "calculate": { "type": "operand", "valueType": "widget", "value": "", "formula": { "formulaType": "tableColumnSum", "parameters": { "tableUuid": "c61398d8-cfa4-4e61-b2f7-5ce26753c9cc", "columnUuid": "e1a00c4d-a12a-46ff-ae4e-c02846942fe1" } } }, "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "modifyCurrency": false, "format": { "decPoint": ".", "thousandsSep": "", "decimals": 2 }, "displayPosition": { "bottomWidgetType": "column", "widgetUuid": "e1a00c4d-a12a-46ff-ae4e-c02846942fe1" } }, { "type": "number", "uuid": "f81868ed-bfda-4081-8a95-8de0d802cf4b", "label": "Total", "help": "", "required": false, "maskEmpty": false, "gridLocation": { "rowNumber": 0, "startColumn": 0, "columnSpan": 6 }, "defaultValue": "0.00", "hasValue": true, "unsupportedTypeValue": "0.00", "conditionalDisplay": null, "calculate": { "type": "operand", "valueType": "widget", "value": "5765b5af-4c0c-4b82-93c6-ff3c17955859" }, { "type": "operator", "value": "ADD" }, { "type": "operand", "valueType": "widget", "value": "fdad89e6-48aa-47c8-ac6d-db56ef34b42b" } , "conditionalDuplication": null, "visible": true, "useInProcessLabel": false, "autoCaps": 0, "format": { "decimals": 2, "decPoint": ".", "thousandsSep": "" }, "displayPosition": { "bottomWidgetType": "table", "widgetUuid": null } } ] }
Constructors
Types
Properties
Inherited properties
Functions
extract data from all fields of a widget.
add calculateObserver to List of calculateObservers
Inherited functions
call back when Parent widget Visibility Changed need to set the parent visibility and recalculate the validity of the widget
notify all calculateObservers by value changes
notify all subscribers when data changed on the widget
update the visibility status and notify all subscribers about the visibility of the widget
called from the activity to add teh callback as subscriber note:subscribers is a Set so we don't need to test if the callback already exist
remove calculateObserver from List of calculateObservers