Hi Debabrata,
You can easily handle the visibility by changing the icons CSS visibility property.
There are multiple ways of doing this, one way could be - using Dojo query like -
dojo.query("div[data-viewid='BPM_File_List1'] > div[data-viewid='DocListPanel'] > div > .panel-body > div > .FileTable > .SPARKTable > div:nth-child(3) > div > table > tbody > tr:nth-child(2) > td[aria-label='Actions'] > div > div > i[aria-label='Delete Document']")[0].style.display = 'none'
Where in tr:nth-child(2), 2 is the row index and BPM_File_List1 is the control id of the BPM File List control.
------------------------------
Atanu Roy
Solution Architect
Salient Process
------------------------------
Original Message:
Sent: Tue April 25, 2023 04:19 PM
From: Debabrata Singh
Subject: BPM File List: Spark UI Control: Enabling/Disabling of Delete(x) icon of Documents containing UI table
Hi,
We are using BPM Flie List spark UI control for uploading and deleting document with an process instance. Its working fine. However, we have a requirement of enabling/disabling(or hiding) DELETE button icon based on a certain business requirement. Since the DLETE icon appears as per the Configuration>Content Management>Allow Document Deletions option, it seems to be difficult to locate the delete icon index of each row of table data and apply enablement/disablement/visibility logic on table data. Please refer to the attached BPM File List table data UI image.
If you have implemented similar functionalities, it would be a great help to have the approach that you have followed. Thanks in advance.
BAW Version: 19.x and 22.x.
Regards,
Deba
------------------------------
Debabrata Singh
------------------------------