Hi,
I am new to CQ5 and am facing difficulty in finding the solution for my problem. So finally decided to post it here and hoping for a reply from the experts over here. I am trying to implement listeners to dropdowns in my application. My requirement is to have four dropdowns and on the update of the top element all the underlying dropdowns should be updated accordingly. The values for these dropdowns are fetched from the DB and they have a foreign key relationship. I have no clue at all how this can be achieved in CQ5. After surfing over the net, I guess it is possible by using a servlet which fetches the data and constructs the JSON object and then update the dropdown options from the JSON object. I have seen various posts but could not find appropriate solution along with a code snippet for me. Here are the few concerns that I have in this regard:
1. Where should I define the listeners and attach them to the dropdown?
2. How do I update the options from the JSON object to the dropdown.
3. Are there any configuration settings that are required to achieve this?
I would like to get a code snippet with clear explanation which any newbie would expect. Please let me know if you need any information from my side.
Thanks in advance for all those helping hands coming forward.
Thanks,
SriRaj