I'm working on an EDS site using Universal Editor and need to offer authors a dropdown with dynamic list. This list can be sourced from either an ACS Commons list or a JSON feed from an API. I'm looking for an out-of-the-box (OOB) solution for this functionality to avoid developing a custom Universal Editor extension.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @salamswapnil,
I don't think, there is fully out-of-the-box way to bind a dropdown to a dynamic list without some customization. However, there could be a few low-code or config-driven approaches you can explore that minimize the need for writing a full Universal Editor extension.
Use JSON schema $ref or enum with a backend transformation layer
If you're using UE with a JSON-based configuration, and you can pre-transform your ACS Commons list or remote API into a static list format (enum), then:
{
"type": "string",
"enum": ["option1", "option2", "option3"],
"title": "Select Option"
}
You could generate this enum list dynamically as part of your content model or API gateway layer, before it reaches UE. But the list won’t dynamically refresh without reloading the schema.
OR
Use ACS Commons Generic List with Core Components + UE JSON schema mapping - If your dropdown needs to reflect an ACS Commons Generic List, and you’re using AEM Core Components (eg. Content Fragment Editor or Metadata), you can: Expose the Generic List as a JSON endpoint.
Hi @salamswapnil,
I don't think, there is fully out-of-the-box way to bind a dropdown to a dynamic list without some customization. However, there could be a few low-code or config-driven approaches you can explore that minimize the need for writing a full Universal Editor extension.
Use JSON schema $ref or enum with a backend transformation layer
If you're using UE with a JSON-based configuration, and you can pre-transform your ACS Commons list or remote API into a static list format (enum), then:
{
"type": "string",
"enum": ["option1", "option2", "option3"],
"title": "Select Option"
}
You could generate this enum list dynamically as part of your content model or API gateway layer, before it reaches UE. But the list won’t dynamically refresh without reloading the schema.
OR
Use ACS Commons Generic List with Core Components + UE JSON schema mapping - If your dropdown needs to reflect an ACS Commons Generic List, and you’re using AEM Core Components (eg. Content Fragment Editor or Metadata), you can: Expose the Generic List as a JSON endpoint.
Hi @SantoshSai
Thank you for your response!
I tried 1st approach but enum is not a valid configuration property. When I tried to use it, UE is throwing error for my EDS block while loading properties rail.
As I am working on EDS, 2nd approach isn't for me.
I think I have to rely on developing UE extension for it.
Views
Replies
Total Likes