APEX BLOB CLOB Sample Application and Mobile Issue

I have done a presentation on how attachments work in Oracle APEX.  Most recently at the RMOUG 2014 training days conference in Denver.  The presentation walks through several of the options for uploading, storing and presenting files to the user.

The packaged up the sample application and the presentation are now ready to share.  The Desktop application is installable on APEX version 4.1.1 and later.

BLOB CLOB Sample Application 1.1

On the same vein, an attachment related issue was presented to me recently with regards to the APEX Mobile themes.

When using Mobile reports, if you want to show the contents of the attachment, it may be a challenge.  There is an issue with attachments links generated by APEX that prevent them from being displayed when using the jQuery Mobile theme.  The issue lies with the AJAX loading of the page before it is displayed.  This will generate an page with the error message “undefined”.

BLOB CLOB - Mobile - Not working
Shows the error seen when using the download link for attachments.

This link was generated using a standard report BLOB column format.

Standard Report - Link definition.
Standard Report – Link definition.

There is a fix for this issue.  The link needs to be generated with an attribute of either:




It is possible to generate the links another way, or to write your own download routine, but I think this is a good opportunity for jQuery to save us some time.

On my report page, I have included a small snippet of jQuery code to locate report links and add the rel=”external” attribute to the anchor tags inside reports.

<script type="text/javascript">
  $(document).bind('pageinit',function() {
    $("[id^=report] .list-view-cell .ui-link").attr( "rel", "external" );
    //alert(" I am done");

Note: Template changes my require adjustment to this example. Review the classes assigned to rows in the report on the theme that you are using.

Reviewing the resulting link for the download should snow the attribute as part of the anchor tag.  This should result in a successful attachment retrieval process on using the mobile theme.

Shows a working example of the Mobile Theme attachment.
Shows a working example of the Mobile Theme attachment.


Note: These examples were developed with APEX 4.2.5.  Future versions may vary.

4 thoughts on “APEX BLOB CLOB Sample Application and Mobile Issue

  1. Doesn’t matter much. It should run after the report is displayed as it is an adjustment to the current links. They need to exist first. Follow your current conventions on where to put your javascript code.

  2. Ok

    I asked you because I have tried with several events (pageinit, ready, load, click) but when the script works, the css does not load .

    Anyway, i will try again heheh


Leave a Reply

Your email address will not be published. Required fields are marked *