How to fetch values from page into the dialog participant step? | Community
Skip to main content
Level 2
October 20, 2017
Solved

How to fetch values from page into the dialog participant step?

  • October 20, 2017
  • 5 replies
  • 3455 views

Hi,

I have this scenario where the approver needs to enter an approval number and check a box if the page has been approved by legal.

When this step is completed, the page is activated and the approval number and checkbox value of the legal approval are stored on the jcr:content node of the page. However next time when the workflow is triggered on the same page, I need to show the previously set values here again once the workflow reaches this step.

I am able to fetch the current values on the page from a Process Step set previous to this dialog participant step.

My question is, where do I set those retrieved values so that the dialog box can pick them and display it on this step?

Thanks for your help.

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 atyaf66

I have answered a similar question on StackOverflow: https://stackoverflow.com/a/46822901/5633515

You should be able to use my answer with very minimal changes to display the values you want.

5 replies

VeenaVikraman
Community Advisor
Community Advisor
October 23, 2017
Level 3
October 24, 2017

We have to write Java Script code to fetch the dialog fields and on pre load/on load of that dialog we can assign the values that we already got to those dialog fields. We have to create a client lib with the same category name (like cq.author) so that no need to load that client lib specifically.

Level 2
October 24, 2017

Hi,

Just like we use cq.widgets, cq.authoring.dialog in dependencies of clientlibs to load JS for authoring dialog on CQ Page, what will be the dependency to load the clientlibs on the dialog participant step?

Thanks for your help.

Level 2
October 24, 2017

I unmarked the correct answer as I requested for some clarifications on it.

atyaf66
atyaf66Accepted solution
Level 2
October 24, 2017

I have answered a similar question on StackOverflow: https://stackoverflow.com/a/46822901/5633515

You should be able to use my answer with very minimal changes to display the values you want.