Populating Drop-down using JSON Data return by Servlet | Community
Skip to main content
tushaar_srivastava
Level 6
June 4, 2019
Solved

Populating Drop-down using JSON Data return by Servlet

  • June 4, 2019
  • 3 replies
  • 2996 views

Hi,

I have written a Servlet that return a valid JSON data in form of below:

Here My requirement is to create a drop down under AEM asset Metadata, that reads the given JSON data by Servlet and populate under Drop-down List (AEM6.3).

I have used Adobe Experience Manager Help | Populating AEM Component Dialog fields using JSON data returned by Sling Servlets (Not working for me),

But I wanted to know, the procedure how we can Implement this into our Asset Metadata dropdown

Arun PatidarkautuksahniJaideepBrar

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi,

Use metadata schema instead of metadata profile and give use servlet registered resourcetype in json path.

AEM Content Fragments: Dropdown Limits in Metadata Schemas?

3 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 4, 2019

Hi,

Use metadata schema instead of metadata profile and give use servlet registered resourcetype in json path.

AEM Content Fragments: Dropdown Limits in Metadata Schemas?

Arun Patidar
August 29, 2019

Can you post an example? Registered a servlet resource type and using that in the JSON path in the dropdown. Does not seem to pull in the json, the servlet itself is not called when I see properties of an asset where this schema is applied. 

arunpatidar
Community Advisor
Community Advisor
August 30, 2019

It does not work with registered servlet, You need to use json.

You can generate json using scheduler or event handler or run time whichever suits you case

or use javascript to call servlet and generate options when metadata schema is loading.

Arun Patidar