Adding preview option in cq:dialog | Community
Skip to main content
jezwn
Level 5
November 12, 2019
Solved

Adding preview option in cq:dialog

  • November 12, 2019
  • 2 replies
  • 3293 views

Is it possible to add a session in cq:dialog which renders whatever data is supplied in the fields and previews it out in real time. In the simplest of scenarios, I need to add two numbers and when I enter both the numbers the cq:dialog should preview it's output as 4. There should be two sessions in the the cq:dialog, like two columns, the left one to enter value to the fields and the right to display the rendered output. How to achieve this? Is it possible to?

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 Umesh_Sondhi

No it can't be possible through Touch UI dialog. Also, as per the spec​​ Sightly does not support operations inside expressions. You would need to create a helper use-object (using either JavaScript or Java) that would provide the test threshold/reference value.

2 replies

Umesh_Sondhi
Umesh_SondhiAccepted solution
Level 4
November 14, 2019

No it can't be possible through Touch UI dialog. Also, as per the spec​​ Sightly does not support operations inside expressions. You would need to create a helper use-object (using either JavaScript or Java) that would provide the test threshold/reference value.

ArpitVarshney
Community Advisor
Community Advisor
November 14, 2019

Hi jezwn​,

  • use extraclientlib property to add your dialog specific clientlibs.
  • write your logic in clientlib js.

Take a reference from this GitHub - Adobe-Marketing-Cloud/aem-authoring-dialog-fields-customization: Sample for customizing field dialogs in AEM To…

Usually we write JS for fields validations in a dialog.However I never came across such kind of requirements but it should be achievable using above steps.

Regards,

Arpit Varshney