Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

What is a good resource to make dynamic dialogs

Avatar

Level 6

I have a dialog that has radio buttons on it. It is simple to make a preset set of options.

 

So if each radio button indicates product brand for the author. Say the company has the following five brands, A,B,C,D,E.

If these brands change very rarely then it is reasonable to hard code in the 5 produces as 5 radio buttons.

However, what if I have the list of brands returning to me from an ajax call to a servlett calling a rest api.

Now I am asked to make the radio button selection dynamic, and to always show the current range of brands returned from my rest api call.

Now I know that my example is not necessarily what one would use in production, and there would be problems if brands disappear off the list and so on.

I am just using it as an example because I think it shows what I am asking in a simple example.

I have searched for answers but I keep going down a rabbit hole. I think it is because I do not fundamentally understand how the JavaScript behind the dialog works, nor do I understand how it interacts with your jsp pages.

I would appreciate it if someone could send me some links to documentation that

1) Explains how to create dynamic dialogs as in my brands example.

2) Explins the JavaScript behind Dialogs and how it interacts with JSP and the JCR.

 

Regards

Clive Stewart

1 Accepted Solution

Avatar

Correct answer by
Level 10
Here is another AEM community article that talks about dynamic dialog functionality: http://scottsdigitalcommunity.blogspot.ca/2014/01/dynamically-updating-aem-custom-xtype.html?m=0

View solution in original post

3 Replies

Avatar

Level 10

I think the best place for you to start is looking at this custom x type article. 

http://scottsdigitalcommunity.blogspot.ca/2014/03/creating-your-first-adobe-experience.html

This will get you started on how to use AEM widget API in a custom JS file.

Avatar

Correct answer by
Level 10
Here is another AEM community article that talks about dynamic dialog functionality: http://scottsdigitalcommunity.blogspot.ca/2014/01/dynamically-updating-aem-custom-xtype.html?m=0

Avatar

Level 6

Thank you Scott,

As usual your advice has helped me 100%.

Kind regards

Clive Stewart