Skip to content

SotRendererRegistry

injectable

Metadata forms render each applied secondary object type (SOT / flavor) as its own section. By default a section auto-generates a field-by-field form from the SOT’s schema. This registry lets you replace the body of a SOT’s section with a custom template so you can render all of the SOT’s properties in one freely designed component (a compact header, a computed summary widget, …) while the surrounding save/reset/pristine machinery stays intact.

Templates are keyed by SOT id and can be registered per situation (EDIT, SEARCH, CREATE). Registering with the default bucket makes a template apply across all situations. Registration is normally done declaratively via the yuvMetadataSotTemplate directive.

Register a default SOT template (used across all situations).

_addDefaultSotTemplate(sot: string, templateRef: TemplateRef<any>): void
NameTypeDescription
sotstring
templateRefTemplateRef<any>

Remove a registered default SOT template.

_removeDefaultSotTemplate(sot: string): void
NameTypeDescription
sotstring

Register a template for rendering a certain SOT.

addSotTemplate(sot: string, templateRef: TemplateRef<any>, situation: Situation): void
NameTypeDescription
sotstring
templateRefTemplateRef<any>
situationSituation

Get the template to render a certain SOT with. Defaults are always merged in, then overlaid by the situation-specific map.

getSotTemplate(sot: string, situation: string): TemplateRef | undefined
NameTypeDescription
sotstring
situationstring

Remove a registered SOT template.

removeSotTemplate(sot: string, situation: Situation): void
NameTypeDescription
sotstring
situationSituation