Hi,
This is a requirement I need to build on top of Re: Customize http://localhost:4502/aem/inbox in vanilla AEM 6.4instance .
I have a custom button say "My Complete" on clicking of which my custom dialog shows up. I have a situation wherein, we need to add a check for our custom button,
that based on certain property, my custom button can show or not. That property needs to be on the task.
Any thoughts/pointers/reference code on this will be helpful.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You can write javascript to add listener for onClick events on selection of task and read task row DOM and check if showButton=true there in DOM then do nothing otherwise hide button
Hi,
The show hide is depends on granite:rel property of button.
And your task should have that value inside meta tag e.g.
Thanks
Arun
Views
Replies
Total Likes
Hi Arun,
Not sure if I got you.
On my custom button have the below granite:rel property that you mentioned
and I am setting for example say some property 'showButton = {Boolean}true' on the task '/content/projects/we-retail/jcr:content/tasks/2018-06-05/task_from_workflowlaunchedbyproject'
Was planning to have something like if showButton = true, show the custom button, else hide it.
Not sure how do I achieve this.
Any thoughts/pointers will be helpful.
Views
Replies
Total Likes
Can you post your package on Google Drive so community can download what you have down and try and solve this for you. Hard to find the solution when there is not access to the details you have done.
Views
Replies
Total Likes
Hi,
You can write javascript to add listener for onClick events on selection of task and read task row DOM and check if showButton=true there in DOM then do nothing otherwise hide button
Hi Scott,
working inbox one.zip - Google Drive
Here there is overlaying done on apps\cq\inbox, so that it displays "My Complete" button as seen below.
All it does right now is to open a custom dialog, on clicking "My complete". The functionality is not built completely yet for the custom dialog.
And I want to hide/show this custom button based on some property in the selected task say 'showButton = {Boolean}true'.
Views
Replies
Total Likes
Hi Arun,
Thank you for your reply.
If you can provide some code around this, would be really helpful.
Views
Replies
Total Likes
I've sent you the code but you need to adapt that according to your requirement.
Thanks
Arun
Here is JS event code example -- JavaScript DOM EventListener
Views
Replies
Total Likes
Hi Arun,
Thanks a ton for your help.
Marking this as correct. Posting another question in forum to as to how to read custom property added on the task [/content/projects/we-retail/jcr:content/tasks/2018-06-08/task_from_workflowlaunchedbyproj ect2] and how to retrieve its value and add business logic to it.
Once again, thanks a lot for all your help.
Views
Replies
Total Likes
Views
Like
Replies