Expand my Community achievements bar.

Create a servlet for exposing Disclaimers

Avatar

Level 5

Hi,

I need to write a servlet to respond with disclaimer HTML code. Input will be the disclaimer ID.

On Disclaimer page , I am using one component with two fields : disclaimer ID and disclaimer details and creating Disclaimer ids and details.

 Now I want to use all these disclaimer details on other pages by using the ID .For this I have one component with drop down values of all disclaimer IDs, once author will select any values from drop down the respective value of that ID will be fetch on page.I need to write one Servlet for this. Please suggest.

 

Regards,

i have written a class like "public class DisclosureModel extends WCMUse {}

:- currently I am calling this from component, can I call this by Servlet class by post method( for third party user)

3 Replies

Avatar

Administrator

To summarize your problem, you need to populate your description based on drop-down value selected and then render it on the page.

For this, please have a look at this AEM Helpx article:- 

Link:- https://helpx.adobe.com/experience-manager/using/dialog_fields_servlets.html

// Populating AEM Component Dialog fields using JSON data returned by Sling Servlets

    Here also values are returned by get/post method then later these values are used.

Link:- http://www.accunitysoft.com/dynamic-options-values-in-aem-dialog-dropdown-using-path/

Link:- https://myprogressivelearning.wordpress.com/2015/01/13/dynamic-options-using-javascript-in-adobe-aem...

// Dynamic options using Javascript in Adobe AEM Dialog

I hope this will help you.

~kautuk



Kautuk Sahni

Avatar

Level 10

First comment is when writting HTL, you should use WCMUsePojo. WcmUse is depreciated. See: http://scottsdigitalcommunity.blogspot.ca/2016/07/creating-aem-html-template-language.html?m=0. You can post to AEM from outside of AEM. 

Avatar

Level 10

Why would you need servlet?

If its authorable component, you can directly use wcmusepojo.