When to Migrate
You do not need to migrate existing V1 forms. They continue to work unchanged. Consider migrating when:- You need dynamic data binding (expressions that reference live data)
- You want scripted event handlers
- You need conditional rendering based on data state
- You want to iterate over data objects with
forloops - You are building new forms that benefit from V2 features
Field Mapping
The following table shows how V1 card fields map to V2UINode fields:
| V1 Field | V2 Field | Notes |
|---|---|---|
type | component | Prefixed with namespace: "label" becomes "card:label" (or just "label", resolved via alias) |
id | key | Used for stable DOM identity. Also consider ref if you need programmatic access. |
properties | props | Static properties. Same keys and values. |
properties (dynamic) | bindings | Move computed or dynamic values from properties into bindings as JavaScript expressions. |
layout | props (or style/class) | V1 grid layout is passed through props for card components that expect it. |
children | children | Same concept, same field name. |
| (none) | bindings | New in V2: dynamic expressions evaluated against the data context. |
| (none) | computed | New in V2: props derived from named scripts. |
| (none) | events | New in V2: declarative event handlers. |
| (none) | if / show | New in V2: conditional rendering and visibility. |
| (none) | for | New in V2: list iteration. |
Before/After Examples
Simple Label
- V1 (YAML)
- V2 (JSON)
Card Panel with Children
- V1 (YAML)
- V2 (JSON)
Data Store Grid
- V1 (YAML)
- V2 (JSON)
Transposed Grid Rollup
- V1 (YAML)
- V2 (JSON)
What Stays the Same
The following aspects are identical between V1 and V2:Card Components
All V1 card components are available in V2. The same Vue components are used under the hood. Component types, their accepted properties, and their visual rendering are unchanged.Property Names and Values
Card properties use the same names and accept the same values.groupTaxon, taxon, useTabs, showHeader, dataStoreRef — all work exactly as before.
Nested Children
Container components (cardPanel, cardGroup, tabs) support children in both V1 and V2.
Data Attribute Editor Behavior
ThedataAttributeEditor component works identically. It reads from and writes to the workspace store in the same way.
What’s New in V2
V2 adds several capabilities that are not available in V1:Bindings
Dynamic expressions that evaluate against the data context. Replace static property values with live data.Scripts
Named reusable functions registered at the form level and invoked viacomputed bindings or scriptRef event handlers.
Events
Declarative event handlers that respond to component interactions with script execution, event emission, and more.Conditional Rendering
Show or hide nodes based on data state:List Iteration
Render a node for each item in a collection:Bridge API
Scripts can interact with the platform through thekodexa.* bridge, providing controlled access to data, navigation, form state, and HTTP methods.
See Bridge API for the full reference.
Migration Steps
Convert cards to nodes
Replace the
cards array with a nodes array. For each card:- Change
typetocomponent(optionally adding thecard:prefix) - Change
idtokey - Change
propertiestoprops - Keep
childrenas-is
Move dynamic values to bindings
Identify any properties that should be computed from data. Move them from
props to bindings and write them as JavaScript expressions.Add event handlers
Add
events entries for any interaction behavior you want. Start with logging to verify events fire correctly.Extract reusable logic into scripts
Move complex or repeated expressions into the
scripts registry and reference them via computed or scriptRef.Full Migration Example
Here is a complete V1 form and its V2 equivalent:- V1 (YAML)
- V2 (JSON)
