What is a good resource to make dynamic dialogs | Community
Skip to main content
Level 6
November 12, 2015
Solved

What is a good resource to make dynamic dialogs

  • November 12, 2015
  • 3 replies
  • 824 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008
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

3 replies

smacdonald2008
Level 10
November 12, 2015

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.

smacdonald2008
smacdonald2008Accepted solution
Level 10
November 12, 2015
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
Level 6
November 18, 2015

Thank you Scott,

As usual your advice has helped me 100%.

Kind regards

Clive Stewart