Custom Page Block
This is not a Java SPI. AuraBoot has no
PageBlockExtensionplugin extension point. Page Block capability is determined jointly by the platform front-end render registry and the back-end DSL whitelist. Here is the real mechanism.
Built-in block types — DslRegistry.BlockType
The source of truth for page block types is the back-end DslRegistry.BlockType enum
(com.auraboot.framework.meta.constant.DslRegistry, Java). It defines every built-in blockType, for example:
form-section, detail-section, form-buttons, filters, embedded-list, card-grid,
chart, gallery, gantt, calendar, heatmap, gauge, funnel, bpm-panel,
evidence-panel, activity-timeline, field-history, iframe, image, divider,
description, action, composite, custom, and more. A page schema's blocks[].blockType takes
these values, with schemaVersion set to 4.
Custom blocks — the front-end BlockRegistry
To add a block the platform doesn't have, the mechanism is to register a renderer on the front end, not to write a Java plugin:
- Front-end registration: in
web-admin/app/ui/schema-renderer/BlockRegistry.ts, callBlockRegistry.register(blockType, { component, normalizeData })—componentis the React render component, and the optionalnormalizeData(raw, block)shapes the raw API payload into the structure the component expects. Components are lazy-loaded byblockType, so not every block is pulled into the main bundle. - Page reference: reference it by that
blockTypein the page schema'sblocks, and configure its data source / properties. - Back end tolerates unknown types:
PageSchemaBlockStructureValidatoronly emits a soft warningS-PAGE-BLOCK-TYPEfor ablockTypenot on the whitelist — it does not hard-reject. This is deliberate forward compatibility, so custom plugin blocks can mount and a newblockTypeis not rejected by an older back end.
Common mistakes
- Registering only on the front end, not in the back-end
DslRegistry.BlockType: import emits the[S-PAGE-BLOCK-TYPE]soft warning. The block still renders (forward compatibility), but to make it a first-class whitelisted type you must add an enum value to the back-endDslRegistry.BlockType. - A
recordsdata source withoutadaptor:table: it defaults to optionList mapping into{value,label}and breaks columns; list / table blocks needadaptor:tableon theirdataSource. - Looking for a custom block as a Java extension point: there is no
PageBlockExtension/@PageBlockannotation — rendering lives on the front end, and the back end only does schema validation.
Related
- Page Designer — drag out blocks visually
- Pages and layouts — page schema (kind / schemaVersion / blocks) structure
- Mobile rendering — how the same block renders on mobile