Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Populating Drop-down using JSON Data return by Servlet

tushaar_srivastava
Level 4
Level 4

Hi,

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

1765555_pastedImage_0.png

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 S... (Not working for me),

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

Arun PatidarkautuksahniJaideepBrar

1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

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

ms.PNG

AEM Content Fragments: Dropdown Limits in Metadata Schemas?

View solution in original post

3 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Hi,

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

ms.PNG

AEM Content Fragments: Dropdown Limits in Metadata Schemas?

View solution in original post

mohitm66654921
Level 1
Level 1

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. 

Arun_Patidar
Community Advisor
Community Advisor

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.