Build an image gallery using APEX

Written by Paulo Vale on Friday, December 19, 2008


This time, I'll show how to build a simple image gallery using Oracle Application Express (APEX) and taking advantage of Jquery framework capabilities. But first of all, follow the link to see the magic happening ;)

There are several slideshow or gallery plugins for Jquery. You can choose the one you like more and re-adapt the code to fit the plugin requirements. My choice was Pikachoose.

Pikachoose is a lightweight Jquery plugin that allows easy presentation of photos with options for slideshows, navigation buttons, and auto play.



Lets begin creating a simple database structure to store the images.

Create a sequence to be used by image id:



Create a table to store the images:



Now on APEX, following the wizard, create a data entry form based on "GAL_IMAGES" table.


Go to Shared Components>Application Items and Create an Application Item. Ex: G_IMAGE_ID.

Create an Application Process to retrieve the image from the database. Identify the point at which this process will run as "On Demand". The point of "On Demand" is that it will only fire when requested by a page process.



Now create the page where you want to put the image gallery and then, Edit Page > HTML Header:




On the same page, create a PL/SQL Dynamic Content region:



And run...

Related Posts by Categories



Widget by Hoctro | Jack Book
  1. 10 comments: Responses to “ Build an image gallery using APEX ”

  2. By Stew on December 19, 2008 4:31 PM

    How very cool!

    But I dare not show this to my users, as they'll want to add that functionality into the app I'm building them right now! :-)

    Thanks for sharing this. I definitely have to try jquery out!

  3. By Francis on December 19, 2008 7:41 PM

    Cool Feature Paolo !

    Thanks.

  4. By Louis-Guillaume Carrier-Bédard on December 19, 2008 7:48 PM

    Nice tutorial!
    Thanks for sharing.

  5. By Paulo Vale on December 20, 2008 11:16 AM

    Thank you for the nice comments :)

  6. By Byte64 on December 20, 2008 3:19 PM

    Well done Paulo!

    I bookmarked this posting for later.

    Cheers,
    Flavio

  7. By Fry on March 3, 2009 4:36 AM

    Love the tutorial! I'm happy to see you're using PikaChoose!

    When I developed it, my intention was to keep it easy to use so that I could implement it into my PHP scripts. Different language but same idea!

    Jeremy

  8. By Paulo Vale on March 3, 2009 8:47 AM

    Jeremy,

    I used PicaChoose on this example because I liked the simplicity of your plugin. Congratulations for that, and keep up the good work..

  9. By Algimas on June 8, 2009 9:39 PM

    Hi Paulo,

    I did this Image_Gallery in my application and it works super ... except one thing ;)
    It stops showing pictures when I turn on the SSP, even if I prepare the whole URL with:

    ...img src="'||APEX_UTIL.prepare_url('f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=SHOW_GALERY:::G_IMAGE_ID:'
    ||rr.FILE_SYSNAME)||'"...

    Best regards,
    Algimas

  10. By Anonymous on September 14, 2009 4:34 AM

    I am new to oracle apex I have build a web site for my church, when I tried to build the app it worked but no image. Is there a step by step for newbe?

  11. By Paulo Vale on September 16, 2009 11:56 PM

    Hi Anonymous,

    Are you having trouble with a specific part of this tutorial?

    It's hard to guess what went wrong. Sometimes a simple colon makes the difference ;)