Using APEX 21.1 in the cloud, but example replicated on 23.2.4
I am trying to preview a file (pdf/image/multimedia) in APEX and I am using an example from Magaly Iraheta that works really well.
I have made some changes (see application: example app/page: DEMO | demo1234 - application 147782) but it comes down to using a derived column on a report and javascript to get the file details and an inline dialog region with an object element to display a preview of the file.
- Click on the derived column DERIVED$01 that uses the cc-preview-pdf class to trigger the jQuery DA
- The fileurl in this column is the report column PREVIEW_LINK which uses an application process to get the file BLOB
- Dynamic action on jQuery select 'Show Preview' populates the data element in the object element of the inline dialog 'Preview'
I want to achieve the same using the action button on a cards region. As an example I have added the card region 'File Cards'
I can mimic step 1 from above by adding a class to the button.
However, I am unsure how to communicate to the DA that the data-file-url="#PREVIEW_LINK#"
Basically, without the derived column, I need a replacement for
<span data-file-url="#PREVIEW_LINK#" ....></span>
Any help appreciated, please