Nextmatch Data Provider
Et2NextmatchDataProvider
Overview
Nextmatch server adapter for Et2Datagrid. It wraps dataFetch + dataRegisterUID in a generic page provider API.
Used by
These widgets create and host this controller.
Methods
| Name | Description | Arguments |
|---|---|---|
createChildProvider()
|
Create a provider for a nested child grid under one parent row. Child providers reuse the same
row-id normalization and refresh path as the root provider, but add parent_id to page
fetches and query signatures.
|
parentRowId: string
|
fetchPage()
|
Fetch one page of rows through Nextmatch APIs and return normalized datagrid rows. We preserve server order by resolving rows into an indexed array before emitting. |
start: number, pageSize: number
|
getQuerySignature()
|
Signature of active query context used by datagrid request deduplication. | - |
getRowData()
|
Resolve canonical row data from egw’s UID cache. |
rowId: string
|
hostConnected()
|
No-op - fetching/caching is entirely on-demand, triggered by page/refresh requests rather than host connection. | - |
normalizeRowId()
|
Normalize arbitrary row identifiers to datastore uid format. |
rowId: string | number, ensurePrefix: boolean
|
processAdditionalData()
|
Process additional data Nextmatch sent such as new SelectOptions or flags. Also used by Et2Nextmatch
for the same scalars when they arrive mixed into the initial rows attribute instead of
a refresh response.
|
additionalData:
|
refresh()
|
Refresh one or more rows and return normalized row updates/removals for the datagrid. The provider does not decide where refreshed rows belong in the visible grid; it only resolves the latest row data and whether a row still exists. |
row_ids: string[], type: Et2DatagridUpdateType
|
releaseRetainedRows()
|
Release every row this query was holding in egw’s cache, letting the normal eviction sweep reclaim them. Called when the query changes or the host detaches - both points where the grid has dropped its rows, so nothing can still be rendered from them. Only this provider’s own listeners are removed, by passing both the shared callback and the host as context. | - |
releaseRetainedRowsForBranch()
|
Release the rows retained by one collapsed subgrid branch, without disturbing rows held by the root query or by any other still-expanded branch. Without this, collapsing an expanded row only dropped Et2Nextmatch’s own snapshots/child-provider entry (see _forgetExpandedBranch()) - the branch’s rows stayed pinned in egw’s central cache via their keep-alive listener for the rest of the page’s life, since the only other release path is a full query change. |
branchKey: string
|
rowIdForData()
|
Resolve the canonical datagrid/action row id for already-available row data. |
rowData: Record<string, any> | null | undefined, fallbackIndex: string | number
|
setForceFreshKnownUids()
|
Toggle “pretend the client has no cached rows” for page fetches. fetchPage() normally passes
null as dataFetch()’s knownUids, and egw_data.ts’s dataFetch() falls back to
egw.dataKnownUIDs(prefix) - which scans the shared, otherwise never-cleared cache and finds this
query’s previously-loaded rows still sitting in it. The server then legitimately omits their data as
“unchanged since last known” - correct for a normal scroll/page fetch, but wrong for an explicit
reload where the UI just cleared its own rows and has nothing to fall back on. Callers must turn
this back off once the reload’s fetch(es) have settled.
|
force: boolean
|
storeRows()
|
Store already-available row data in egw’s UID cache using the same row-id normalization as fetched rows. This preserves the Nextmatch contract that visible rows are discoverable through egw.dataKnownUIDs(). |
rows: any[], skipCallback: boolean
|
toProviderRowId()
|
Strip the datastore prefix from a row id to recover the bare provider/server id. |
dataStoreRowId: string
|
clearInitialRowRegistrations()
|
Kept as the previous name for this operation, which Et2Nextmatch calls on filter changes and row
replacement.
use releaseRetainedRows() |
- |