Skip to content

Choicelist initializers declared in JavaScript #692

Description

@romain-pm

Part of EPIC #554. Implemented — under review in #687.

registerChoiceListInitializer({ key }, resolveValues) bridges to ModuleChoiceListInitializer OSGi services, usable from CND as choicelist[key] / choicelist[key='param']. Context: CND param, content locale (BCP-47), accumulated values, edited node, raw Java escape hatch. Returns {label, value, properties?} (properties variant supported, e.g. defaultProperty). Async callbacks supported (#688). Live-verified on Jahia 8.2 via the Content Editor forms API (values, defaultProperty, param, per-field escape hatch, fr localization).

Docs: guide 5-choicelist-initializers. Tests: convertValues unit tests + choicelistInitializerTest.cy.ts. Known platform limit (documented): keys are a global last-wins namespace — prefix with the module name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions