Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Preview Files from action button on Cards region

AnnelizeFMay 21 2024 — edited May 21 2024

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.

  1. Click on the derived column DERIVED$01 that uses the cc-preview-pdf class to trigger the jQuery DA
  2. The fileurl in this column is the report column PREVIEW_LINK which uses an application process to get the file BLOB
  3. 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

This post has been answered by fac586 on May 21 2024
Jump to Answer
Comments
Post Details
Added on May 21 2024
2 comments
499 views