Extension Seam Reference
This is the source-verified, exhaustive reference for the Core-component extension seams — exact signatures, the types each seam hands you, the enums, and the schema shapes. It is the companion to the narrative Extending Core Components guide; read that first for when and why. Read this when you need the precise shape — and when an LLM or a code generator needs an authoritative contract it can rely on.
Every signature, property, and enum value on this page was copied verbatim from the 7.0 BFF source (
MediaiBox.Cms.FrontEnd.*, MibServer3releases/7.0at3b0beac2b, 2026-09-22 — the declarations are identical from tag 7.0.1 to that commit; 7.0.0 differs in the two places marked 7.0.1+). Where a name differs from what you might guess, that is called out — those are the traps. Namespaces are given so you know whichusingto add.mib doctorre-checks every seam listed here against a MibServer3 checkout and reports one the platform declares that this page does not list.
MIB 7.1 is built from MibServer3
mainand has no package yet (its first build will be7.1.0). It is 7.0 (releases/7.0at tag 7.0.6) plus two pull requests: MibServer3#1983 (MEDIAIBOX-12321) and MibServer3#1996 (MEDIAIBOX-12362). Every signature below is the same on 7.1. What 7.1 adds or changes is marked 7.1+ and was checked againstmainat1d4c48922(2026-10-07).
1. Seam signature reference
Every seam is a protected virtual method (or, for ShouldHideComponent, a
public virtual interface method) with a no-op / identity default. "Stage"
governs what a thrown exception does — see the
Error & resilience contract.
| Seam | Archetypes | Exact signature (verbatim) | Stage | Fires at |
|---|---|---|---|---|
TransformData |
List · Related · Ordered | protected virtual void TransformData(ListV2ViewData data, ListViewData viewData) |
Render | end of MapData — the first render, the self-fetch path, and FetchExternalData (async-data / async-refresh of a self-fetching list). Not on a top-level List's POST /api/v2/list/data (paging, sort, search): DefaultListDataHandler wraps the rows without calling the component — live-verified on 7.0.4. Not on a normal Related/Ordered list's async-data / async-refresh (the workflow's own MapData serves them) |
TransformData |
Form | protected virtual void TransformData(FormV2ViewData data, FormViewData viewData) |
Render | end of MapData; once per segment of a form group |
TransformData |
ContentCriteria | protected virtual void TransformData(ContentCriteriaV2ViewData data, ContentCriteriaViewData viewData) |
Render | end of MapData |
ContributeSchema |
List | protected virtual void ContributeSchema(ListSchema schema) |
Render | end of MapSchema, first render only (never on a refresh or async endpoint). 7.1+: add a key to schema.Configuration with SchemaConfigurationBuilder |
ContributeSchema |
Related · Ordered | protected virtual void ContributeSchema(RelatedListSchema schema) |
Render | end of MapSchema, first render only (Ordered uses RelatedListSchema, not a dedicated type). 7.1+: schema.Title and schema.Info can be set (they win over TITLE / FOOTER_INFORMATION, which are already applied), and SchemaConfigurationBuilder adds configuration keys. The schema is built before the rows are fetched, so the text cannot depend on them |
ContributeSchema |
Form | protected virtual void ContributeSchema(FormSchema schema) |
Render | end of MapSchema; once per segment of a form group |
ContributeSchema |
ContentCriteria | protected virtual void ContributeSchema(ContentCriteriaSchema schema) |
Render | end of MapSchema |
ShouldHideComponent |
all 5 | public virtual Task<bool> ShouldHideComponent(ComponentContext context, CancellationToken cancellationToken) |
Render | ComponentEvaluator, V2 render only, once per component — before MapSchema/MapData and before a form group fans out. Not on V1, refresh, list-data, save or delete |
OnPermissionResolved |
all 5 | protected virtual void OnPermissionResolved(ComponentPermission permission, List<ResponseItemContent> responses) |
Render | end of GetPermissions, on the full render (V1 and V2) only — never on refresh, list-data, async endpoints, save or delete (Form: not on the BulkEditPermissionConflictException throw path) |
OnFeaturesResolved |
all 5 | protected virtual void OnFeaturesResolved(ComponentFeatures features) |
Render | right after OnPermissionResolved, same scope. CanCreate / CanSave / CanDelete read and write the resolved permission; CanClone is inert on List |
OnSearchCriteriaBuilt |
List only | protected virtual void OnSearchCriteriaBuilt(SearchCriteria criteria) |
Render | the first render (GetSecondaryInformationRequests) and every POST /api/v2/list/data refresh — after the page FILTER is copied into criteria.GlobalFilter (see How a seam's filter combines) |
OnFormSaveBuilt |
Form | protected virtual void OnFormSaveBuilt(PersistenceComponentSaveSingleEntityData saveData, PostbackComponentRequest request, SaveContext saveContext) |
Save (before persist) | in Save, after the business-rule plugin, etags, file upload and the custom validator; before OnPersistExternal. Not on the HideBulkEdit short-circuit, nor with no ids. 7.1+: can add rows of another media type to the same batch (saveContext.Contribute) and ask or warn the operator (request.Prompts) |
OnRelatedSaveReconciled |
Related · Ordered | protected virtual void OnRelatedSaveReconciled(PersistenceComponentSaveRelatedEntitiesData saveData, PostbackComponentRequest request, SaveContext saveContext) |
Save (before persist) | in Save, after the reconcile and its plugins. Not under external persistence. Related: not on HideBulkEdit with more than one id. Ordered: not on any multi-id save. 7.1+: can contribute rows to the batch and ask or warn the operator |
OnContentCriteriaSaveBuilt |
ContentCriteria | 7.0.1+: protected virtual void OnContentCriteriaSaveBuilt(IPersistenceSaveData saveData, PostbackComponentRequest request, SaveContext saveContext) — 7.0.0: the same without saveContext |
Save (before persist) | in Save, on both the recreate and new-from-item paths (cast saveData to PersistenceComponentSaveMediaTypeCollection); not when Context.IDs.Any() && Configuration.HideBulkEdit (any id, not only a bulk edit). 7.1+: can contribute rows to the batch |
ProvidesExternalPersistence |
Related · Form · Ordered (7.0.1+) | protected virtual bool ProvidesExternalPersistence => false; |
— | opt-in gate read by Save |
OnPersistExternal |
Form | protected virtual Task OnPersistExternal(PersistenceComponentSaveSingleEntityData saveData, PostbackComponentRequest request, SaveContext saveContext, CancellationToken cancellationToken) |
Save (instead of persist) | when ProvidesExternalPersistence is true, after OnFormSaveBuilt; Save then returns PersistenceComponentNoSaveData and the response is SuccessNoContent. When it runs differs by line. 7.0: inside Save, so before the later components are collected and before the page plugin's ExecuteBeforeSave (a save they then refuse has already written). 7.1+: Save returns the write (PersistenceComponentExternalSaveData) and PersistWorkflow runs it in page order once every component is collected, the page plugin let the save through and the save prompts are decided — just before the batch. saveContext.SaveDataList then holds every component of the page. A refusal by the batch itself still comes after the write |
OnPersistExternal |
Related · Ordered (Ordered 7.0.1+) | protected virtual Task OnPersistExternal(PersistenceComponentSaveRelatedEntitiesData saveData, PostbackComponentRequest request, SaveContext saveContext, CancellationToken cancellationToken) |
Save (instead of persist) | when ProvidesExternalPersistence is true, before the reconcile: saveData carries only the envelope (keys, media types, parent ids, batch references) and the reconcile, the business-rule/validation plugins, ValidateChildRequired and OnRelatedSaveReconciled are all skipped; the response is Success with {"ids": []}. 7.1+: deferred like the Form one (above), behind the page's refusals |
OnAfterSaveResponseBuilt |
Related · Form · Ordered · ContentCriteria | protected virtual void OnAfterSaveResponseBuilt(PostbackComponentResponse response, List<PersistenceComponentResult> results) |
Save (after persist) | end of OnAfterSave, after the mib.api write committed |
OnDeleteBuilt |
Related · Form · Ordered · ContentCriteria | protected virtual void OnDeleteBuilt(IPersistenceDeleteData deleteData, PostbackComponentRequest request) |
Delete (before persist) | Related / Ordered: always (with a NoDeleteData). Form: only on a real delete (not on HideBulkEdit or a missing id). ContentCriteria: on the real delete and the final no-delete path (not on HideBulkEdit). Delete runs for every persistable component on the page, and request is null for one that was not in the delete body. 7.1+: deleteData.IDs and deleteData.MediaType are on IPersistenceDeleteData itself (no downcast; empty / null when the model deletes nothing), and a non-null request can ask the operator |
OnAfterDeleteResponseBuilt |
Related · Form · Ordered · ContentCriteria | protected virtual void OnAfterDeleteResponseBuilt(PostbackComponentResponse response, List<PersistenceComponentResult> results) |
Delete (after persist) | end of OnAfterDelete |
ProvidesExternalData |
List · Related · Ordered · Form | protected virtual bool ProvidesExternalData => false; |
— | opt-in gate; read once per pageKey\|templateComponentKey and cached for the process lifetime (a false stays until the BFF restarts). A self-fetch Related/Ordered list is served a stub schema (no MibApi meta to build one from). 7.0: the stub ignores the page's TITLE, FOOTER_INFORMATION, row link and SHOW_REFRESH_BUTTON. 7.1+: it applies them — the row link is REDIRECT_TO_EDIT_PAGE_BY_FIELD[ID], else EDITURL (simple list only) |
OnFetchData |
List · Related · Ordered | protected virtual Task<ListV2ViewData> OnFetchData(FetchContext context, CancellationToken cancellationToken) |
Render | replaces the MibApi fetch when ProvidesExternalData is true (MapData and FetchExternalData) |
OnFetchData |
Form | protected virtual Task<FormV2ViewData> OnFetchData(FetchContext context, CancellationToken cancellationToken) |
Render | replaces the MibApi fetch when ProvidesExternalData is true. On 7.0.0 a self-fetching form's refresh throws KeyNotFoundException (the guard is 7.0.1+). The self-fetch render returns before the page's field knobs are applied (GetRenderData / MapSchema short-circuit, so LoadFieldSpecificConfigurations never runs): READONLY, READONLY_FIELDS, INCLUDE_FIELDS/EXCLUDE_FIELDS, FORMGROUPING, SECTION_BEHAVIORS, CUSTOM_BEHAVIORS, CUSTOM_FIELD_SCHEMA, RANGE_FIELDS, DISABLE_IF_FILLED, CARD_FIELD are dead config there — set the equivalent in ContributeSchema. And the stock Save/Delete still write its MEDIATYPE with the page ids: a display-only form overrides them (mib get recipe.inert-display-form) |
List has no entity save/delete of its own (it is a read surface), so the save/delete seams do not apply to it. ContentCriteria does not provide external data; Form does, since 7.0.0 (
ProvidesExternalData+ its ownOnFetchDataoverload). External persistence is Related, Form and — from 7.0.1 — Ordered.
Two-parameter save overrides do not compile on 7.0.
OnFormSaveBuiltandOnRelatedSaveReconciledgainedSaveContext saveContextin 7.0.0 (with no two-parameter overload left),OnContentCriteriaSaveBuiltin 7.0.1. An oldprotected override void OnFormSaveBuilt(saveData, request)fails with CS0115; removingoverridemakes it compile and never run.
What a throw does, per seam
| Seam | A throw… |
|---|---|
ShouldHideComponent |
is caught (ComponentEvaluator): the component is marked Errored and dropped, the page still renders |
TransformData |
first render: the component renders with null data and [Render-ComponentFailure] is logged; async-data / async-refresh: an empty list; refresh: RefreshComponentException — the request fails |
ContributeSchema |
drops the component from the response ([Render-ComponentFailure] logged); the page returns 200 |
OnPermissionResolved / OnFeaturesResolved |
is swallowed (DisplayWorkflow): the permission becomes Create = Deny, Delete = Deny, Read = Allow, Write = DontCare — it fails open on Read. Only a ComponentAndPageException is rethrown |
OnSearchCriteriaBuilt |
first render: the component's secondary fetch is skipped; refresh: RefreshComponentException — the request fails |
| the save / delete seams (before persist) | aborts the save — throwing PersistenceValidationException(Configuration.TemplateComponentKey, "{DICT:…}") is the intended way to reject one |
OnAfterSaveResponseBuilt / OnAfterDeleteResponseBuilt |
runs after the write committed: nothing is rolled back — catch and log, and keep response.Status a Success. A SuccessWithWarning is a 400 on /api/v2 unless the client sent saveOutcome: 1 (7.1+, see Save prompts and warnings; the React shell does from cms-2.55.0) — a shell before cms-2.55.0 then shows an error for a save that went through |
A seam that needs the operator's answer does not throw: on 7.1+ it asks through request.Prompts
and the save stops before anything is written (see Save prompts and warnings).
Contributing to the save batch — SaveContext.Contribute (7.1+)
A component's save model carries one media type (PersistenceComponentSaveSingleEntityData and
PersistenceComponentSaveRelatedEntitiesData each have a single MediaType). From 7.1 a save seam
(OnFormSaveBuilt, OnRelatedSaveReconciled, OnContentCriteriaSaveBuilt, OnPersistExternal) can add
more models to the same mib.api batch: a status-history row, a parent cascade, the owning entity of a
two-level create. They commit or fail together with the component's own model, and a row can reference a
row the same batch creates through its BatchReference. An after-save side effect
(PostSaveChain) can do neither. On 7.0 the only way was
to override Save.
protected override void OnFormSaveBuilt(PersistenceComponentSaveSingleEntityData saveData,
PostbackComponentRequest request, SaveContext saveContext)
{
// A row of another media type, written in the same batch as the form: an edit that changed STATUS
// (Fields is the diff on an edit) records it in a history media type.
var itemId = saveData.IDs.FirstOrDefault();
if (itemId <= 0 || !saveData.Fields.TryGetValue("STATUS", out var status)) return;
saveContext.Contribute(new PersistenceComponentSaveSingleEntityData(ApiClient, Context)
{
MediaType = "WORKFLOW_STATUS_HISTORIES",
IDs = new[] { 0 }, // [0] = create
Fields = { ["STATUS"] = status, ["ITEM_ID"] = itemId },
});
}
// Two-level create: the component's own row points at a row the batch creates first.
var owner = new PersistenceComponentSaveSingleEntityData(ApiClient, Context)
{
MediaType = "INSTANCE_PRICING",
IDs = new[] { 0 },
BatchReference = "PRICING", // the bare name: it reads back as "$PRICING"
};
saveContext.Contribute(owner, first: true); // persisted before the component's own row
saveData.Fields["INSTANCE_PRICE_ID"] = owner.BatchReference;
The rules (SaveContext.cs, MibServer3 main 1d4c48922):
| Rule | What happens otherwise |
|---|---|
A contribution follows the component's own model, in contribution order; first: true puts it before. |
A row that references another row persisted later fails the batch. |
Every contribution is re-keyed {TemplateComponentKey}_CONTRIBUTION_{n}, whatever key the seam gave it. Reference its row by its BatchReference, never by its key. |
— (the key is overwritten) |
Assign BatchReference the bare name ("PRICING"). |
With a leading $ the setter keeps only "$"; the batch refuses it with InvalidBatchReferenceException. |
A contribution that updates rows needs an Etags entry for each id (the etag, or null to update without the check). |
MissingContributionEtagException, unless the save ignores etags. |
| Contribute each model once, and never the component's own model. | ArgumentException / InvalidOperationException. |
A contribution that fails fails the save it rode with. Its success is not handed to the component: OnAfterSave answers with the component's own id and etag. A page-persistence plugin sees every result. |
— |
SaveContext.Find(key) and SaveContext.SaveDataList return each sibling's own model even when it contributed. Code that holds an IPersistenceSaveData and type-tests it calls saveData.GetComponentModel() first. |
A type test against a contributing sibling silently finds nothing. |
Nothing contributed: Save returns the component's own model unchanged. |
— |
Save prompts and warnings — request.Prompts (7.1+)
On 7.0 a save can only succeed or fail: every extension point before the write can continue or refuse,
and /api/v2 answers any status but Success with a 400. 7.1 adds two answers, for a client that sends
"saveOutcome": 1 in the save or delete body (see the
save outcome contract):
- A warning on a save that went through.
request.Prompts.Warn(message)(a component, fromSave,Deleteor a seam that receives the request) orcontext.Prompts.Warn(message)(the page persistence plugin's before hooks) reports a message once the save is committed, without stopping it. So do a component answeringSuccessWithWarning, a componentValidationExceptionreturned after the commit, and the plugin's after hooks (PagePersistencePluginResult.Warning, anError, or an exception). The page status is computed exactly as before; the warnings are extra data. - A question before saving.
request.Prompts.Ask(prompt)returns the id of the option the operator chose, ornullwhile the question is open. An open question stops the save after every component and the plugin's before hook have run, before any external write (OnPersistExternal), the batch or an after hook. The client gets a 409 with every open question, and sends the same save again withpromptAnswers. A seam that reads an answer can ask a follow-up, one level per round.
protected override void OnRelatedSaveReconciled(PersistenceComponentSaveRelatedEntitiesData saveData,
PostbackComponentRequest request, SaveContext saveContext)
{
var pending = CountPendingJobs(saveData); // your rule
if (pending == 0) return;
var answer = request.Prompts.Ask(SavePrompt.Choice(
$"jobs:pending:{saveData.ParentIDs.First()}", // same id for the same condition, per record
$"This channel has {pending} pending jobs.",
new SavePromptOption("cancel-jobs", "Cancel the jobs and save"),
new SavePromptOption("keep-jobs", "Save and keep the jobs"),
SavePromptOption.Cancel()));
if (answer == null) return; // open: nothing is persisted this round
// Answered ("cancel-jobs" / "keep-jobs"): act on it in OnPersistExternal (Ask returns the answer there) or
// after the commit — not in this seam, which runs again on every round.
}
SavePrompt.Warning(id, message) (one answer, OK), SavePrompt.Confirmation(id, message) (OK / Cancel) and
SavePrompt.Choice(id, message, options) build the questions (MediaiBox.Cms.FrontEnd.Model.UI.Postback).
Every question needs a message and at least one option that does not cancel. The id must be stable for the
same condition (include the record id when the condition is per record): the client answers by id alone, so
two components may ask the same question under one id, but a different question under an id already asked
fails the save.
Who is asked. Only an endpoint that can answer the 409 declares its client: the v2 display save and delete
do it for "saveOutcome": 1 — the React shell sends it from cms-2.55.0, on the edit page's save and delete.
Every other caller (a shell before cms-2.55.0, which sends neither field, the v1 persistence endpoints,
the inline edit, code that builds a PostbackRequest) never has a question left open: a Warning is answered
OK for it (and its message goes to warnings that caller does not show), and a question with a real choice
refuses the save as a validation — a 400 on /api/v2, nothing persisted. So a rule that must always hold stays
a validation (PersistenceValidationException): the answer is asserted by the client.
Every round runs the save again. The components' Save, the business-rule and validator plugins and the
page plugin's before hooks run on each round, and a component that uploads files during Save (the form, the
related form, new rows of the simple and ordered lists) uploads again. Keep side effects out of the before
stage; act on an answer in OnPersistExternal (where Ask returns the recorded answer) or after the commit.
A save stopped by a question or a validation reports no warnings; the next round raises them again.
Endpoints on a stock subclass — GetHandler (7.1+)
A component serves /api/v2/handler/{pageKey}/{templateComponentKey} (GET / POST / PUT / DELETE) through
IHandlerComponent<TConfiguration>.GetHandler(), which returns an IHandler
(MediaiBox.Cms.FrontEnd.Model.Mvc.UI.Handler: Get, Post, Put, Delete, each
Task<IActionResult>(HttpRequest request, CancellationToken cancellationToken)).
| Archetype | 7.0 | 7.1+ |
|---|---|---|
List (ListComponentBase) |
public IHandler GetHandler(), not virtual |
public virtual — stock body unchanged |
Related (RelatedListComponentBase) |
not virtual | public virtual — stock body unchanged |
Ordered (OrderedRelatedListComponent) |
no handler at all | public virtual; serves the same row preview as Related (?op=preview, /api/v2/list/inline/{page}/{component}/{id}) |
Form (FormComponent) |
no handler | public virtual, returns null (the stock form serves no endpoint; a request fails with InvalidHandlerComponentException, as before) |
| ContentCriteria | no handler | no handler |
On 7.1, override it and delegate what you do not handle to base.GetHandler(), so the stock row preview keeps
working. On 7.0 the only option on List / Related is public new IHandler GetHandler(): it works only because
HandlerWorkflow finds the method by reflection on the runtime type, and it stops applying wherever the
component is reached through the base type.
The route checks no permission. HandlerV2Controller → HandlerWorkflow.GetHandler (MibServer3 main and
releases/7.0) finds the page, the template component and its class, and calls GetHandler() — no menu gate, no
page or media-type permission. Any signed-in operator can call any page's handler, with any ids and parameters. So
the handler checks: the media type (Context.User.MediaTypePermissions.GetByName(...)) or a configurable key, and
the record — and never acts for a user id the browser sent without checking who may. On GVP,
UserPinsComponent.ResetPin(int userId, …) resets the PIN of whatever user id it receives.
Collaborators exposed on the base classes
An override can reach these without re-resolving anything (types verbatim):
| Member | Type | Notes |
|---|---|---|
ApiClient |
IMibApiClientLibrary |
the MIB API client (protected) |
WorkflowFactory |
IWorkflowFactory |
list/form/meta/preference workflows (protected; on List the field is _workflowFactory) |
Configuration |
ListComponentConfiguration / RelatedListComponentConfiguration / OrderedRelatedListComponentConfiguration / FormComponentConfiguration / ContentCriteriaComponentConfiguration |
the typed config row (public) |
Context |
ContextViewData |
IDs, User, CopiedFrom, RestoreState, … (public) |
HttpContextAccessor |
IHttpContextAccessor |
on List / Related (protected) |
The override rung — page-wide Save / OnAfterSave / MapData
Seams are per-component: an override sees only its own PostbackComponentRequest (TemplateComponentKey, Data,
JsonData, EtagData, File — no page-wide view). When you need the whole page's save list — cross-component
coordination, deriving one component's save from another's — drop one rung below the seams to the public virtual
methods the base classes already expose:
| Override | Signature (verbatim) | Sees |
|---|---|---|
Save |
public virtual async Task<IPersistenceSaveData> Save(PostbackComponentRequest request, List<IPersistenceSaveData> saveDataList, CancellationToken cancellationToken) |
the page-wide saveDataList (every component's built save model) |
OnAfterSave |
public virtual PostbackComponentResponse OnAfterSave(List<PersistenceComponentResult> results) |
all components' persist results |
MapData |
public virtual async Task<FormV2ViewData> MapData(object viewData, CancellationToken cancellationToken) (return type is archetype-typed: FormV2ViewData / ListV2ViewData / …) |
the full view-data build (TransformData fires at its end) |
This is the middle tier between a seam override and a fully-custom component: still IRenderableComponentV2, still
inheriting the base pipeline, but with the page-wide handle the per-component seams can't give you. Call base.Save(…) /
base.MapData(…) to keep the stock behavior, then adjust. Reach for it only when a seam genuinely can't see enough.
2. FetchContext (the OnFetchData request)
MediaiBox.Cms.FrontEnd.Model.UI.List.FetchContext — a sealed class, all
properties { get; init; }.
| Property | Type | Meaning |
|---|---|---|
ParentIds |
IReadOnlyList<int> |
parent entity id(s) for a related/ordered list; empty for a top-level list |
Page |
int |
zero-based page index |
Limit |
int |
rows per page |
Order |
string |
sort, e.g. "DATEINS,desc"; null when unsorted |
Filter |
string |
free-text / global filter — or the raw value of a structured filter |
FilterCondition |
Condition |
structured field + operator + value filter; read this for id < 2 vs name == 2 |
MediaType |
string |
the component's configured media type |
Population by archetype and path (what is actually filled when OnFetchData runs). The component calls it
from MapData (the first render) and, for a list-family component, from FetchExternalData (the async-data /
async-refresh endpoints):
| Field | List | SimpleRelated / Ordered — async endpoints | SimpleRelated / Ordered / Form — first render (MapData) |
|---|---|---|---|
ParentIds |
empty | parent id(s) — always | parent id(s) |
MediaType |
✅ always | ✅ always | ✅ always |
Page / Limit |
✅ from SearchCriteria |
✅ from the request | ❌ 0 — page yourself or return everything |
Order |
✅ from SearchCriteria.Order |
❌ never (the related criteria has no sort field) | ❌ |
Filter (raw) |
✅ from SearchCriteria.GlobalFilter |
the FilterCondition.Value, when present |
❌ |
FilterCondition |
— (List uses free-text Filter) |
✅ on the async-data endpoint; ❌ on async-refresh (no filter sent) | ❌ |
The advanced search does not cross into OnFetchData on a top-level list. BuildFetchContext fills only
ParentIds, Page, Limit, Order, Filter (from SearchCriteria.GlobalFilter) and MediaType
(ListComponentBase.cs:612) — SearchCriteria.Conditions[] and their Clause are dropped, and FilterCondition
stays null (only the workflow-driven IExternalDataListComponent.FetchExternalData path fills it). If your external
fetch has to honour the advanced-search chips, capture the criteria in OnSearchCriteriaBuilt and read it back in
OnFetchData; there is no other channel. Omitting that override does not fail loudly — the filters simply stop
applying behind a valid 200.
Paging is gated by AsyncMode. A Related/Ordered list only paginates when its Configuration.AsyncMode is on
(GetRelatedsRequest(…, paginateRelateds: Configuration.AsyncMode, page: criteria.Page, limit: criteria.Limit));
with AsyncMode off the BFF fetches all relateds unpaged and Page/Limit are ignored — so FetchContext.Page/Limit
are only meaningful under AsyncMode, and a non-async related list hands OnFetchData the full set. Ordered additionally
gates its own paginate on Limit > 0. This is the knob to reach for when a related list is slow on a large parent.
3. Type glossary — the models a seam hands you
Full public shapes, verbatim. Namespace precedes each type.
Render data
MediaiBox.Cms.FrontEnd.Model.UI.List.ListV2ViewData
Items : List<ItemV2ViewData> · Total : int · Charts : List<DashboardWidgetData> · AddedIds : int[] · RelatedItems : List<ItemV2ViewData> · SaveOptions : SaveOptions
MediaiBox.Cms.FrontEnd.Model.UI.List.ItemV2ViewData : ModelObject
Id : int · Fields : Dictionary<string, object> · Permissions : Permissions · Etag : string (JSON checksum) · Title : string
MediaiBox.Cms.FrontEnd.Model.UI.Form.FormV2ViewData : ItemV2ViewData
adds CreatedAt : string. Form field values live in the inherited
Fields dictionary (values are FormFieldV2ViewData subclasses:
SelectableFieldViewData, KeyValueViewData, ImageFieldViewData,
UserFieldViewData, LinkFieldViewData). There is no per-field wrapper on
the view data itself.
MediaiBox.Cms.FrontEnd.Model.UI.ContentCriteria.ContentCriteriaV2ViewData
Id : int · Operation : string · Groups : IEnumerable<ContentCriteriaV2GroupViewData> · Order : ContentCriteriaV2OrderViewData · Highlights : IEnumerable<ItemV2ViewData>
ContentCriteriaV2GroupViewData→Operation : string·Conditions : IEnumerable<ContentCriteriaV2GroupFilterViewData>ContentCriteriaV2GroupFilterViewData→FilterId : string·Value : object·Id : intContentCriteriaV2OrderViewData→Primary : ContentCriteriaV2OrderOptionViewData·Secondary : …·MaxItemCount : intContentCriteriaV2OrderOptionViewData(astruct) →Value : string·HasPreview : bool
MediaiBox.Cms.FrontEnd.Model.Dao.Permissions (the Permissions on an item)
Create : bool · Write : bool (JSON edit) · Delete : bool (JSON remove) · Read : bool · Preview : bool? · Download : bool? · QuickEdit : bool
Permissions
MediaiBox.Cms.FrontEnd.Model.UI.Component.ComponentPermission
Read : PermissionType · Create : PermissionType · Write : PermissionType · Delete : PermissionType (ctor defaults all to Deny)
Save / delete models
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.PersistenceComponentSaveSingleEntityData : IPersistenceSaveData (Form)
IDs : IEnumerable<int> · Fields : Dictionary<string, object> · Relateds : Dictionary<string, List<int>> · Etags : Dictionary<int, string> · Files : EntityFileLinkCollection · MediaType/TemplateComponentKey/ParentTemplateComponentKey/PageKey : string · ApiClient : IMibApiClientLibrary · Context : BaseContext · BatchReference : string (computed; throws if blank)
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.PersistenceComponentSaveRelatedEntitiesData : PersistenceComponentSaveMultipleEntitiesData (Related / Ordered)
ParentIDs : List<int> · ParentBatchReference : string · AddedRelateds : List<int> · RemovedRelateds : List<int> · OrderedRelateds : List<string> · CurrentItems : List<dynamic> · BulkMode : PersistenceBulkMode · ParentRelateds : Dictionary<int, List<int>> — plus everything inherited from PersistenceComponentSaveMultipleEntitiesData (below): DeletedEntities / UpdatedEntities / NewEntities / Etags, so a related/ordered save can create/update/delete the child entities, not only link them (+ inherited MediaType, TemplateComponentKey, …)
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.PersistenceComponentSaveMultipleEntitiesData (the base of the related model above, and the List bulk save — created/updated/deleted rows in one request)
DeletedEntities : List<int> · UpdatedEntities : Dictionary<int, PersistenceEntityData> · NewEntities : List<PersistenceEntityData> · Etags : Dictionary<int, string>
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.PersistenceEntityData (one row inside a multi-entity save — the unit UpdatedEntities/NewEntities carry)
Fields : Dictionary<string, object> · Relateds : Dictionary<string, List<int>> · Etag : string · Files : EntityFileLinkCollection
Batch-reference conventions — how a not-yet-persisted parent is referenced by its new children inside one $batch. A component that creates entities publishes
BatchReference = TemplateComponentKey.ToUpperInvariant() + "_CREATED_ENTITIES"; a related save then addresses the parent by reference rather than by id —
url = {ParentMediaType}/${ParentBatchReference}/{MediaType} — and emits relation ops shaped like { "<MediaType>": { "operation": "Add", "values": [ … ] } }.
When your override builds or inspects a related save, read ParentBatchReference / BatchReference off the save model to interoperate; do not hand-roll the $-prefixed reference.
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.IPersistenceDeleteData (: IPersistenceData) is an empty marker on 7.0, so the ids and media type are reachable only by downcasting. 7.1+: it declares IDs : IEnumerable<int> (default: empty) and MediaType : string (default: null) as default interface members — read them on the interface. Empty means no ids are known, not that nothing is deleted (a custom model that deletes through requests of its own and does not implement them reads empty). The common concrete type is PersistenceComponentDeleteData:
IDs : IEnumerable<int> · Etags : Dictionary<int, string> · MediaType/TemplateComponentKey/ParentTemplateComponentKey/PageKey : string · ApiClient : IMibApiClientLibrary
MediaiBox.Cms.FrontEnd.Model.Mvc.UI.Postback.PostbackComponentRequest : ModelObject (the request a save/delete seam receives)
TemplateComponentKey : string (alias Key) · Data : Dictionary<string, JsonElement> · JsonData : string · EtagData : string (alias Checksum) · File : string · 7.1+ Prompts : SavePromptScope (Ask(SavePrompt) : string, Warn(string); see Save prompts and warnings)
MediaiBox.Cms.FrontEnd.Model.UI.Postback.PostbackComponentResponse : ModelObject
TemplateComponentKey : string · Status : PostbackStatus · ErrorMessage : string · JsonData : string · EtagData : string
MediaiBox.Cms.FrontEnd.Model.Dao.Persistence.PersistenceComponentResult : ModelObject
ResponseIdentifier : string · Status : PostbackStatus · Response : IPersistenceResponse · IsThereAnErrorInSomeOtherComponent : bool
Context, criteria, identity
MediaiBox.Cms.FrontEnd.Model.Mvc.UI.Component.ComponentContext — the type
ShouldHideComponent receives. Single member: ViewData : object (the
component's built view data). It does not carry IDs/User — for those read the
component's own Context. (Note: a different, unrelated ComponentContext
lives under …Model.UI.Context.Components.Context — not this one.)
MediaiBox.Cms.FrontEnd.Model.UI.Context.ContextViewData : BaseContext — the
component's Context property.
IDs : IEnumerable<int> · User : UserViewData · CopiedFrom : int · IgnoreRelateds : bool · ReturnUrl : string · RestoreState : bool · PreviousPageKey : string · IsCopyFlow : bool (=> CopiedFrom > 0)
MediaiBox.Cms.FrontEnd.Model.Dao.Item.SearchCriteria (the OnSearchCriteriaBuilt argument):
paging and shape Page : int · Limit : int · MediaType : string · Order : string · DisplayFields : string[] · DisplayFieldsTranslated : string[] · DisplayFieldsType : string[] · DisplayValuePattern : string · ShowAllFieldsMode · ShowOnlySelectedItems : bool —
filters GlobalFilter : string · GlobalFilters : Condition[] (null by default) · ConditionGroups : ConditionGroup[] (empty by default) · Conditions : Condition[] (the user's search) · Clause : string · Joins : Join[] · IsSourceFilter : bool —
search history IsAdvancedSearch · IsFavorite · SearchFavoriteId — content criteria ContentCriteriaTemplateComponentKey · ContentCriteriaRequest · ContentCriteriaId · HasContentSelection — other SourcePermission · ReturnUrl · SkipPersistence
MediaiBox.Cms.FrontEnd.Model.Dao.Item.Condition (the FetchContext.FilterCondition, SearchCriteria.Conditions / GlobalFilters and ConditionGroup.Conditions element)
MediaType : string · Field : string · Operator : string (declared as @Operator, default "Equal") · Value : string · Clause : string (default "Or") · LeftSearchClause : Condition[] · RightSearchClause : Condition[]
ConditionGroup — Clause : string (default "And"; how this group joins the previous one — the first group's is ignored) · Conditions : Condition[] (inside a group each condition joins by its own Clause, which defaults to "Or")
How a seam's filter combines with the page FILTER (ListComponentBase + ItemRepository, releases/7.0):
- The page's
FILTERconfiguration is copied intocriteria.GlobalFilterbeforeOnSearchCriteriaBuiltruns. ItemRepositoryturnsGlobalFiltersinto the request filter first — and a non-blankGlobalFilterthen replaces it. So on a page with aFILTER, aConditionappended toGlobalFiltersis discarded without a word.ConditionGroupsis the one member AND-combined with what is there:GLOBAL_$and_(groups). Use it to add a restriction. The pageFILTERis not parenthesized, so aFILTERwith a top-level_$or_plus any group (or a user search) is refused with a 400 — write such aFILTERas(…).- A
ConditionwithoutMediaTyperenders as$relation()[FIELD](a relation to an empty type) and mib.api fails on it. Always setMediaType = criteria.MediaType. GlobalFilteritself is mib.api's filter grammar (FIELD_$op_value, e.g.STATUS_$eq_ACTIVE,(A_$or_B)_$and_C); a"STATUS=ACTIVE"is not grammar. See the ListComponentFILTERsection for the syntax.
MediaiBox.Cms.FrontEnd.Model.UI.Component.SaveContext (the save seams' third argument, 7.0.0+; ContentCriteria 7.0.1+) —
SaveDataList : IReadOnlyList<IPersistenceSaveData> (the in-flight save models of the sibling components already processed on this postback; never null; the component's own model is not in it) · Find(string templateComponentKey) : IPersistenceSaveData (case-insensitive; null when that sibling has not been built yet) · 7.1+ Contribute(IPersistenceSaveData saveData, bool first = false) · Contributions : IReadOnlyList<IPersistenceSaveData> · WithContributions(componentData, apiClient, context) (called by the Core at each archetype's Save return; see Contributing to the save batch)
Sibling order is the template order, not "parents first". The page persists its components by
ORDER, then by creation order (template component id), so a parent form is inSaveDataListonly when the template puts it first. The parent-first rule inPersistWorkflow.GetPersistableComponentsreads only thePARENT_MEDIA_TYPE/MEDIA_TYPEkeys, so pages configured withPARENTMEDIATYPE/MEDIATYPEnever trigger it. From 7.0.5 (MEDIAIBOX-12345) ties are broken by creation order again, as on 6.0; 7.0.0–7.0.4 reversed them, so a related list created after its form was persisted (and rendered) before it. Find a sibling withFind(key), never by index.7.1+: an entry of
SaveDataList(and whatFindreturns) is the sibling's own model even when its seam contributed. Elsewhere, unwrap with theIPersistenceSaveData.GetComponentModel()extension before a type test.
MediaiBox.Cms.FrontEnd.Model.UI.Component.ComponentFeatures (the OnFeaturesResolved argument) —
CanCreate / CanSave / CanDelete : bool (read true only when the resolved permission is Allow; assigning writes Allow / Deny into it) · CanClone : bool (folds back into the clone-enabled state only when assigned — CloneAssigned; inert on a top-level List)
ResponseItemContent (the OnPermissionResolved responses element) lives in
the sibling API-client assembly: MediaiBox.Cms.Api.Client.Model.ResponseItemContent : ResponseContent
(Identifier : string, StatusCode : HttpStatusCode, RequestId : string, Container : PayloadResponse).
4. Enum reference (exact members + values)
// MediaiBox.Cms.FrontEnd.Model.UI.Component.PermissionType
enum PermissionType { Deny = -1, DontCare = 1, Allow = 2 } // NOTE: no 0; Deny always wins, DontCare defers, Allow grants
// MediaiBox.Cms.FrontEnd.Model.UI.Postback.PostbackStatus
enum PostbackStatus {
Success = 0, SuccessNoContent = 1, Error = 2, NoOperation = 3,
ValidationException = 4, ErrorHandled = 5, InvalidEtag = 6,
SuccessEtag = 7, SuccessWithWarning = 8,
PromptRequired = 9 // 7.1+: the save asked the operator and persisted nothing (409 on /api/v2)
}
Building-block enums (namespace MediaiBox.Cms.FrontEnd.Server.Component.Extensions):
enum BulkMode { None, Add, Remove, Clear, Replace } // BulkReconciler
enum SaveAtomicityMode { BestEffort, FailFastStop, Compensating } // SaveTransactionContext
enum SaveOutcomeStatus { Rejected, Committed, PartialCommittedSideEffectFailed }
enum PostSaveStatus { Success, SuccessWithWarning, Error } // PostSaveResult
enum RelatedCopyType { DoNotCopy, ShallowCopy, DeepCopy } // LifecycleContext
enum ComponentRenderOutcome { Rendered, Hidden, Degraded, Errored } // RenderResult
enum HttpVerb { /* ActionPipeline */ }
enum ActionResponseKind { /* ActionPipeline */ }
5. Schema type reference
What ContributeSchema hands you. Override-relevant properties are bold.
MediaiBox.Cms.FrontEnd.Model.UI.List.ListSchema : IComponentSchema
Columns : List<ColumnV2ViewData> · Filters : List<MediaTypeFilter> · FormPageKey : string · Configuration : object · MediaType : string · Name : string (this is the list's title) · Charts : DashboardSchema
ListSchemahas noParentField(that's onRelatedListSchema) and its title isName, notTitle.
MediaiBox.Cms.FrontEnd.Model.UI.List.RelatedListSchema : IComponentSchema
Columns : List<ColumnV2ViewData> · Filters : List<MediaTypeFilter> · FormPageKey : string · Configuration : object · ParentField : string · MediaType : string · Title : string (the page's TITLE; setter internal on 7.0, public on 7.1+) · Info : string (the line under the list, the page's FOOTER_INFORMATION; same)
Trap (7.0):
RelatedListSchema.Title/Infohaveinternalsetters — code in a customer assembly cannot assign them. Set the title through configuration, not the schema. (Used by both SimpleRelatedList and OrderedRelatedList.) 7.1+: both setters are public, soContributeSchemacan set the panel's title or the line under it for the record being shown (what it sets wins; what it leaves stays the page's).
ListSchema.Configuration / RelatedListSchema.Configuration are declared object but hold a closed type
(ListSchemaConfiguration / RelatedListSchemaConfiguration, or an anonymous object on the self-fetch path).
7.1+: add a key with SchemaConfigurationBuilder.
MediaiBox.Cms.FrontEnd.Model.UI.Form.FormSchema : IComponentSchema
Fields : List<FormFieldSchema> · Title : string · Configuration : FormSchemaConfiguration (strongly typed, not object) · MediaType : string
MediaiBox.Cms.FrontEnd.Model.UI.ContentCriteria.ContentCriteriaSchema : IComponentSchema
Columns : IEnumerable<ContentCriteriaColumnV2ViewData> (element type is ContentCriteriaColumnV2ViewData, not ColumnV2ViewData) · Filters : IEnumerable<MediaTypeFilter> · Fields : IEnumerable<ContentCriteriaField> · Order : IEnumerable<ContentCriteriaOrderOption> · Title/Info : string · Threshold/MaxFilters/MaxGroups : int · FormPageKey : string
ContentCriteriaSchemahas noConfigurationand noParentField.
MediaiBox.Cms.FrontEnd.Model.UI.List.ColumnV2ViewData (a list column)
DataIndex : string (the match key) · Title : string · Hidden : bool · DefaultHidden : bool · DefaultOrder : int · DisabledHide : bool · Sorter : bool · Width : int · Field : EditableListFieldSchema (JSON editionField) · RenderConfig : RenderConfig
MediaiBox.Cms.FrontEnd.Model.UI.Form.FormFieldSchema (a form field)
Type : string (required; serializes as JSON variant) · Config : Dictionary<string, dynamic> (required) · Props : object (required) · Behaviors : object
Trap:
Type,Config,Propsare C#required— anynew FormFieldSchema { … }must set all three. There is noName/DataIndexon a form field (its identity is buried inConfig/Props), which is whyFormSchemaBuilderselects fields by predicate, not by name.
6. Availability matrix (at a glance)
| Capability | Seam | List | Related | Form | Ordered | ContentCriteria |
|---|---|---|---|---|---|---|
| Render data | TransformData |
✅ | ✅ | ✅ | ✅ | ✅ |
| Schema | ContributeSchema |
✅ | ✅ | ✅ | ✅ | ✅ |
| Visibility | ShouldHideComponent |
✅ | ✅ | ✅ | ✅ | ✅ |
| Permission | OnPermissionResolved |
✅ | ✅ | ✅ | ✅ | ✅ |
| Features (create / save / delete / clone) | OnFeaturesResolved |
✅ | ✅ | ✅ | ✅ | ✅ |
| Save · before persist | OnRelatedSaveReconciled / OnFormSaveBuilt / OnContentCriteriaSaveBuilt |
— | ✅ | ✅ | ✅ | ✅ |
| Save · replace persistence | ProvidesExternalPersistence + OnPersistExternal |
— | ✅ | ✅ | ✅ (7.0.1+) | — |
| Save · after persist | OnAfterSaveResponseBuilt |
— | ✅ | ✅ | ✅ | ✅ |
| Delete · before persist | OnDeleteBuilt |
— | ✅ | ✅ | ✅ | ✅ |
| Delete · after persist | OnAfterDeleteResponseBuilt |
— | ✅ | ✅ | ✅ | ✅ |
| Fetch shaping | OnSearchCriteriaBuilt |
✅ | — | — | — | — |
| Data source (swap fetch) | ProvidesExternalData + OnFetchData |
✅ | ✅ | ✅ | ✅ | — |
| Save · add rows to the same batch (7.1+) | SaveContext.Contribute |
— | ✅ | ✅ | ✅ | ✅ |
| Save / delete · ask or warn the operator (7.1+) | request.Prompts.Ask / .Warn |
— | ✅ | ✅ | ✅ | ✅ |
Endpoints (/api/v2/handler) |
GetHandler override |
7.1+ | 7.1+ | 7.1+ | 7.1+ | — |
7. Copy-paste recipes
Complete, compiling overrides for the most common tasks. Each is the entire custom class — everything else is inherited. Pick one, rename, adjust. For larger, realistic components that combine several seams (with wiring, what the operator sees, and tests), see Samples & Use Cases.
Add a computed/derived column (value + the column that shows it):
public sealed class MovieListComponent : ListComponent
{
protected override void TransformData(ListV2ViewData data, ListViewData viewData)
{
foreach (var item in data.Items)
item.Fields["AVAILABILITY"] = Availability(item); // computed, not stored
}
protected override void ContributeSchema(ListSchema schema) =>
ListSchemaBuilder.For(schema)
.Show("LICENSE_START").Show("LICENSE_END") // INCLUDE_FIELDS-only columns with no ORDERLIST arrive hidden
.AddColumn("AVAILABILITY", "Availability"); // appended LAST; throws if the DataIndex already exists
}
What decides the columns around it (live-verified on 7.0.4 — the full model is in
ListComponent → columns): ADM_FIELDS.ORDERLIST orders the visible columns whatever order
INCLUDE_FIELDS is written in, and a column without an ORDERLIST rides along hidden: true, alphabetical by
display name — so "License End" lands before "License Start" until the seam shows and places them. AddColumn
appends at the end and throws on an existing DataIndex (every media-type field is already in the schema, hidden or
not — use Has/Show/Override for those); SetOrder only sets the column's "reset view" position. To move a
column, reorder schema.Columns itself. The computed value comes from TransformData, which runs on the first
render only — a top-level list's paging, sort and search (/api/v2/list/data) return rows without it.
Hide / reorder / relabel columns:
protected override void ContributeSchema(ListSchema schema)
{
ListSchemaBuilder.For(schema)
.Hide("INTERNAL_NOTES")
.Override("TITLE", c => c.Title = "Name");
// The builder has no "move": SetOrder only sets DefaultOrder (the reset-view position). Reorder the list itself.
var status = schema.Columns.FirstOrDefault(c => string.Equals(c.DataIndex, "STATUS", StringComparison.OrdinalIgnoreCase));
if (status != null) { schema.Columns.Remove(status); schema.Columns.Insert(Math.Min(1, schema.Columns.Count), status); }
}
Make a form field read-only (or change its variant):
protected override void ContributeSchema(FormSchema schema) =>
FormSchemaBuilder.For(schema)
.OverrideWhere(f => (f.Config.GetValueOrDefault("name") as string) == "SLUG",
f => f.Behaviors = new { readOnly = true });
Server-side filter + sort a list (List only):
protected override void OnSearchCriteriaBuilt(SearchCriteria criteria)
{
// ConditionGroups is the ONE filter member AND-combined with the page's FILTER (which already sits in
// criteria.GlobalFilter — a Condition appended to GlobalFilters would be discarded on such a page).
// MediaType is required (without it the condition becomes $relation()[STATUS]); Clause defaults to "Or".
var groups = (criteria.ConditionGroups ?? Array.Empty<ConditionGroup>()).ToList();
groups.Add(new ConditionGroup
{
Clause = "And",
Conditions = new[] { new Condition { MediaType = criteria.MediaType, Field = "STATUS", @Operator = "Equal", Value = "ACTIVE", Clause = "And" } },
});
criteria.ConditionGroups = groups.ToArray();
criteria.Order = "DATEINS,desc";
}
It runs on the first render and on every /api/v2/list/data refresh, so the restriction holds while the user
pages, sorts and searches. See How a seam's filter combines with the page FILTER.
Hide a whole panel by entity state or a flag:
public override Task<bool> ShouldHideComponent(ComponentContext context, CancellationToken ct)
=> Task.FromResult(Configuration.GetFlag("PPV_ENABLED") == false);
Deny (or force) a permission for this component:
protected override void OnPermissionResolved(ComponentPermission permission,
List<ResponseItemContent> responses)
{
if (!Context.User.HasCapability("subscription.create"))
permission.Create = PermissionType.Deny; // Deny always wins; leave the rest as resolved
}
Block a save with a clean, localized message (before-persist; throwing is intended here):
protected override void OnFormSaveBuilt(PersistenceComponentSaveSingleEntityData saveData,
PostbackComponentRequest request, SaveContext saveContext)
{
// On an EDIT, Fields carries only what the user CHANGED: judge TITLE only when it is in the diff, or every
// edit that leaves the title alone would be rejected as "required". A create carries every field.
if (saveData.Fields.TryGetValue("TITLE", out var title) && string.IsNullOrWhiteSpace(title as string))
throw new PersistenceValidationException(Configuration.TemplateComponentKey, "{DICT:ERROR/TITLE_REQUIRED}");
}
To enforce a rule on a field the user did not touch, read the persisted value (ApiClient.Get(Context.IDs))
rather than the diff.
Dedupe / filter the reconciled relation set:
protected override void OnRelatedSaveReconciled(PersistenceComponentSaveRelatedEntitiesData saveData,
PostbackComponentRequest request, SaveContext saveContext)
{
var existing = GetExistingIds();
saveData.AddedRelateds.RemoveAll(existing.Contains); // drop already-related ids
}
Guarded post-save side effect (never fail a committed save for a hiccup):
protected override void OnAfterSaveResponseBuilt(PostbackComponentResponse response,
List<PersistenceComponentResult> results)
{
if (response.Status == PostbackStatus.Error) return; // don't act on a failed save
try { _kafka.PublishChanged(Context.IDs.First()); }
catch (Exception ex) { _log.Exception(ex); } // the save is committed: keep it a Success
}
Keep the response a Success. A SuccessWithWarning is a 400 on /api/v2: a React shell before cms-2.55.0
shows an error for a save that went through, and a create saved again is duplicated. Only a client that sends
"saveOutcome": 1 to MIB 7.1+ (the shell does from cms-2.55.0; see Save prompts and warnings) gets it as a 200 with a warning —
then set response.Status = PostbackStatus.SuccessWithWarning and response.ErrorMessage (the message; a
warning without one is dropped). On 7.0, to tell the operator, send them a notification.
A side effect that must commit or fail with the save belongs in the batch instead
(SaveContext.Contribute, 7.1+).
Swap the data source to an external API (List — paging + structured filter):
public sealed class JobsListComponent : ListComponent
{
private readonly IJobsApi _jobs;
protected override bool ProvidesExternalData => true;
protected override void ContributeSchema(ListSchema schema) =>
ListSchemaBuilder.For(schema).AddColumn("ID", "Job").AddColumn("STATUS", "Status");
protected override async Task<ListV2ViewData> OnFetchData(FetchContext ctx, CancellationToken ct)
{
// ctx.FilterCondition carries Field+Operator+Value; ctx.Filter is the raw value.
var page = await _jobs.ListAsync(ctx.Page, ctx.Limit, ctx.Order, ctx.FilterCondition, ct);
return new ListV2ViewData(new ListViewData())
{
Total = page.Total,
Items = page.Items.Select(j => new ItemV2ViewData
{ Id = j.Id, Fields = new() { ["STATUS"] = j.Status } }).ToList()
};
}
}
External cleanup after a delete:
protected override void OnAfterDeleteResponseBuilt(PostbackComponentResponse response,
List<PersistenceComponentResult> results)
{
if (response.Status != PostbackStatus.Error) _blobStore.DeleteOrphans(Context.IDs);
}
Mask / redact a value before it reaches the client:
protected override void TransformData(ListV2ViewData data, ListViewData viewData)
{
foreach (var item in data.Items)
if (!Context.User.HasCapability("pii.view"))
item.Fields["EMAIL"] = "•••";
}
Trap — not a security boundary on a top-level List.
TransformDataruns on the first render only. Paging, sorting and searching go throughPOST /api/v2/list/data, whose handler (DefaultListDataHandler) builds the rows without calling the component — so page 2, a sort or a search returns the raw value (live-verified on 7.0.4: aTransformData-computed column is absent from everylist/datarow).OnSearchCriteriaBuiltis the one List seam that runs on both paths; dropping the field fromcriteria.DisplayFieldsthere keeps mib.api from returning it — confirm withmib client search <pageKey> "<condition>"before relying on it. A Form has no such data path (its data comes with the render), and a self-fetching list (ProvidesExternalData) runsTransformDataon its refresh too.
See the Building Blocks reference for the reusable helpers a seam body calls, and the Troubleshooting guide when an override doesn't behave as expected.