Read Page Property(json data)
added a jsondata property in page property now i want to read that json data page property and according to that json i want to render some dropdown field in a custom component i created
added a jsondata property in page property now i want to read that json data page property and according to that json i want to render some dropdown field in a custom component i created
Hi @knki ,
Please follow this blog to understand how you can load a dropdown list on a dialog dynamically using granite datasource: https://unlocklearning.in/dynamic-dropdown-in-aem/#elementor-toc__heading-anchor-4
However, the use case you have is a little different, in the blog you'll find that the json is stored at a particular path but in your case it is present as a page property. You can change the implementation of the JsonDataDropdownServlet to fetch the JSON from page properties instead of fetching is from the jsonDataPath property, you can ignore the jsonDataPath property altogether.
Hope it helps.
-Vikas Chaudhary
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.