Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build CQ.Dialog from the dialog json in javascript?

Tags:

javascript

aem

In javascript, I get the dialog as follow:

var url = CQ.HTTP.externalize(pathToDialog+".infinity.json");
var dialog = CQ.HTTP.eval(url);

my Question is How to convert this dialog to CQ:Dialog Widget, sothat I can use CQ:Dialog Methods like find( String prop, String value ), which u can find in the CQ5 Widget API

Thanks for help

like image 961
Max_Salah Avatar asked Apr 14 '14 08:04

Max_Salah


People also ask

What is a dialog box in JavaScript?

JavaScript - Dialog Boxes. JavaScript supports three important types of dialog boxes. These dialog boxes can be used to raise and alert, or to get confirmation on any input or to have a kind of input from the users. Here we will discuss each dialog box one by one.

How to use confirmation dialog box?

You can use a confirmation dialog box as follows. The prompt dialog box is very useful when you want to pop-up a text box to get user input. Thus, it enables you to interact with the user. The user needs to fill in the field and then click OK.

What is the use of prompt dialog box?

Prompt Dialog Box. The prompt dialog box is very useful when you want to pop-up a text box to get user input. Thus, it enables you to interact with the user. The user needs to fill in the field and then click OK.

What is the use of dialog box in Salesforce?

These dialog boxes can be used to raise and alert, or to get confirmation on any input or to have a kind of input from the users. Here we will discuss each dialog box one by one. An alert dialog box is mostly used to give a warning message to the users.


1 Answers

You can use the getDialog() method of CQ.WCM class to get the dialog object for the url. Additionally, you can also pass a config object to perform functions like caching the dialog, looking for the dialog in the cache alone and so on.

var dialog = CQ.WCM.getDialog(pathToDialog + ".infinity.json");
like image 146
rakhi4110 Avatar answered Nov 01 '22 17:11

rakhi4110