Hello,
I have a dialog with drop-down values coming from data source. As it is used across the site I need to get the "page path" when I click on the dialog.
So is there a way to send the page path/payload when clicked on the dialog.
Thanks,
Adithya.
Solved! Go to Solution.
Are you able to get workflow instance in Java? if yes then you can read payload from there when you access from inbox.
Otherwise do with javascript
1. you can read data-payload-link attribute and fetch payload part using path
data-payload-link="/bin/wcmcommand?cmd=open&path=%2Fcontent%2FAEM63App%2Ffr%2FtestJS&_charset_=utf-8"
decodeURIComponent("%2Fcontent%2FAEM63App%2Ffr%2FtestJS")
2. on dialog load you can read this and make an ajax request to pull dropdown option and create dropdown using javascript.
Hi,
You can get the page path inside dialog or send to datasource. But I didn't understand when and where you need page path. Could you please explain in detail?
Views
Replies
Total Likes
You haven't mentioned touch or classic ui and other details...
If you want to perform any action or get something on click of dialog button, you would need to add listeners to the dialog. For page path, you could use $PATH or CQ.WCM.getPagePath() or some other way
check -
Adobe Experience Manager Help | Using Event Handlers in Adobe Experience Manager Touch UI Components
Views
Replies
Total Likes
Hello Arun,
In workflow participant step I wanted to show list of Approvers. The approver list will change based on the payload (page) belongs to which site(site based approvers).I am getting the approvers list form the custom AEM user Group through a data source populated as drop down.
When I am opening the payload and try to complete the workflow step, I am getting the current page path by using
Enumeration values = getRequest().getHeaders(REFERER);
if (values != null)
{
while (values.hasMoreElements())
{ pagePath = (String) values.nextElement();
}
}
But when I am trying to complete the workflow step directly from AEM Inbox, then I am not getting any information about the payload in the data source code because the page path as localhost:4502/aem/inbox.
I am trying to achieve the above
Views
Replies
Total Likes
Are you able to get workflow instance in Java? if yes then you can read payload from there when you access from inbox.
Otherwise do with javascript
1. you can read data-payload-link attribute and fetch payload part using path
data-payload-link="/bin/wcmcommand?cmd=open&path=%2Fcontent%2FAEM63App%2Ffr%2FtestJS&_charset_=utf-8"
decodeURIComponent("%2Fcontent%2FAEM63App%2Ffr%2FtestJS")
2. on dialog load you can read this and make an ajax request to pull dropdown option and create dropdown using javascript.
Javascipts are not working as expected int the workflow. I am not able to get the payload value too into my Java Class.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies