ObjectMetadataSotTemplateDirective
Directive to be applied to a ng-template. It registers the template as the renderer for a complete secondary object type (SOT / flavor) inside the object metadata form. When a SOT has a registered template, its section renders that template instead of the auto-generated field-by-field form.
The template receives a SotRendererContext as its implicit context. Use it to push status changes upward (ctx.setStatus) and to react to reset/pristine commands (ctx.command$), keeping the shared form integration intact.
A single template can be registered for one SOT or for several at once by passing an array of SOT ids to sot.
Example :
<ng-template yuvMetadataSotTemplate="default" sot="sot:invoice" let-ctx>
<my-invoice-sot [ctx]="ctx" />
</ng-template>Example :
<ng-template yuvMetadataSotTemplate="default" [sot]="['sot:invoice', 'sot:receipt']" let-ctx>
<my-invoice-sot [ctx]="ctx" />
</ng-template>Directive Metadata
Section titled “Directive Metadata”Selector: [yuvMetadataSotTemplate]
Standalone: Yes
Implements: OnInit, OnDestroy
Inputs
Section titled “Inputs”situation
Section titled “situation”Type: Situation
Default Value: Situation.EDIT
Situation to register the template for. So only object forms for that situation (CREATE, EDIT, SEARCH) will use the template. Defaults to EDIT.
Type: string | string[]
Required: Yes
The secondary object type (SOT / flavor) id(s) to register the template for. Pass a single id or an array of ids to reuse the same template for multiple SOTs.
yuvMetadataSotTemplate
Section titled “yuvMetadataSotTemplate”Type: string
Bucket to register the template. Use ‘default’ for templates that should be used across all situations.