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

In javascript, I get a dialog like this:

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

my Question: How to convert this dialog to CQ: Dialog Widget, sothat I can use CQ: Dialog methods such as find (String prop, String value), which can be found in the CQ5 widget API .

thanks for the help

+6
source share
1 answer

You can use the getDialog () method of the CQ.WCM class to get the dialog object for the URL. In addition, you can also pass a configuration object to perform functions such as caching a dialog, searching for a dialog in the cache, etc.

 var dialog = CQ.WCM.getDialog(pathToDialog + ".infinity.json"); 
+3
source

All Articles