xwidget-fields — every field a widget declaration takes (generated)
Straight from the editor's
.xwidgetcontract: every field, where it is edited, and what it does. Rules and idioms live innumable docs xwidget; a field that is not listed here does nothing and reports nothing.
| Field | Required | Edited in | Notes |
|---|---|---|---|
version |
yes | the canvas workspace | File format version — always 2 |
title |
yes | the widget form | The widget's name, shown on the dashboard, in the add-widget panel and in the home-screen widget list |
sub |
— | the widget form | Subtitle |
layout |
yes | the widget form | Size code: tens digit = columns, ones digit = rows (22 is two by two) |
i18n |
— | the "Edit translations" entry | Language overrides for title/sub (B table); params are data and are not localized |
params |
— | the widget form | Instance parameters — what lets the same widget be added twice and watch two different things. Scalars only |
events.onClick |
— | the widget form | Whole-widget tap Tapping the widget on the home screen opens the app and replays this binding; both forms (nav string and action flow) work there. |
events.onEdit |
— | the widget form | Long-press "Edit parameters" · optional With an action flow: collect the value via singleValue / xform, then write it back with widget.updateParams. With a route: html / xpage / form page types all work. |
jobs |
— | the widget form | When users long-press this widget, "Add reminder" lists these rules. Widget parameters can be prefilled into the reminder. Each entry has a rule id and a parameter mapping. Parameters can take a widget parameter or a fixed value; data source outputs don't exist yet when the user adds the reminder, so they can't be mapped. Without entries, "Add reminder" is not shown in the long-press menu. |
canvas.source |
yes | the canvas workspace | What this widget looks like — points at a .rcn |
canvas.depends |
— | the canvas workspace | Where this widget's data comes from — one or more data-flow bindings |
canvas.refresh.interval |
— | the canvas workspace | Window HH:MM-HH:MM@seconds or raw seconds |
canvas.refresh.at |
— | the canvas workspace | Daily time point HH:MM |
canvas.refresh.tz |
— | the canvas workspace | IANA timezone |
canvas.onEdit |
— | has no effect | Has no effect here — no platform reads it. Long-press editing hangs off the top-level events.onEdit |
"Edited in" refers to where it lives in the desktop editor; when you write the file by hand it only tells you which level of the file the key belongs to.