So I had a couple comments on my Accordion Implementation I whipped up the other day.

Plus someone wanted to be able to initialize with a certain pane open and also to create the Accordion based off of regions not a report. So I took all that to heart and rewrote my implementation a bit plus some extras I wanted and you get.

Report Based Accordion

and Region Based Accordion

The onmouseover interaction now has a 1/2 second delay.

The object initialization is now a bit more robust with more options. Most of them have pretty normal defaults. The one I recommend setting everytime is OpenMaxHeight as it gives a more consistent user experience.

function pg_Init(){
pAccordian = new Accordion('accordion');
/* optional */
pAccordian.OpenType = 'onmouseover'; //onclick or onmouseover default = onclick
pAccordian.OpenMaxHeight = 150; // optional but recommended max height of opened pane
pAccordian.OpenPane = 1; // open Accordian pane on init 1 based array
pAccordian.class_Item = 'item'; // set the class to collect item item nodes
pAccordian.class_Title = 'title'; // set the class that collects title nodes
pAccordian.class_Title_Current = 'title_current'; // set the class to set current title
pAccordian.class_Content = 'content': // set the class that collects content nodes
/*init object*/


I'll probably be playing with this some more but I wouldn't be surprised if you saw a slightly altered version end up in product, declarative of course ;) , it seems like a good fit.

Now all I have to do is figure out how to type as fast as this guy plays a real Accordion and I could get some real work done.

2 Words for Cocoon.

Hi Carl,
I am new to APEX so my question is probably too simple but if you could describe in 2 words the major benefit of using Cocoon as opposed to just FOP.

Thanks in advance,


Well lucky for you Vadim I just happened to be playing around with my Cocoon instance today and am absolutely even more thrilled with the APEX + Cocoon combo than before. So my 2 words if I had to pick them would be XML and Pipelines!

XML for two reasons.
Once Cocoon is setup most of it's configuration is controlled by the sitemap.xmap file which is an XML file , no java libraries, no crazy .conf files, just nice clean XML. For me who has a rational hatred towards all things java this is awesome.

Also the mechanics behind the PDF printing no matter if you using BI Publisher or the Apache FOP solution or my Cocoon example is XML + XSL > FOP = PDF.
Cocoon is made to deal with XML and XSL in hundreds of ways, just using the sitemap.xmap file which gets us to the next word......

Pipelines the cornerstone of Cocoon.

Now the dirty little secret I have is that I never use the XSL that is posted from the APEX engine. I use XSL from the filesystem.

In Cocoon once you have your XML you can look into it for certain values and pipeline the XML to different transformations. This can easily give you different report formats for the same Apex Report depending on near any value in the report , page or session.

One of the things I hope to make facilitating this in the future is to allow for each report (via the APEX Builder) to have an individual FOP posting endpoint.

Finally two more points , though it goes over my two word limit it's my blog, in Cocoon you also have the ability for RTF output which you don't get from standard FOP and also the ease of setup which I find amazingly easy.


Today is the Day of Silence on Internet Radio, and guess what I noticed! I work from home and listen to Internet Radio near all day. The music is better than regular radio and I don't have to listen to the same song 15 times a day.

If you haven't done it yet go visit read up on the issue here , (retroactive rate hikes what the HE**!!) the rules and rates are insane and don't make any sense.

I don't know who thinks this is a great idea but talk about trying to kill an industry in it's infancy. People this is killing the goose that is going to lay the golden egg, you've all read the story! So take a couple minutes and write your congressperson and senators.

Like the conversation I just had with my sister.

(08:32:47 AM) sister : :-O
(08:34:54 AM) sister : it was funny i just was bit**** to cyndi how today was a day of no internet radio and then you pooped in with the site to write
(08:35:10 AM) carl: have you written your senator
(08:35:12 AM) carl: senator
(08:35:18 AM) carl: or are you just bit****
(08:35:31 AM) carl: because just bit**** ain't gonna help

Now I'm not going to kid you , I care about this for purely selfish reasons. When coding I have music playing all the time, I like new music, I like good music, I can't get either of those from regular radio and barely from satellite radio but I get tons of it from streaming audio. So if your in the position to do so drop your senators and representative an email or a call it only takes 5 minutes.



Because this post is slightly political and very opinionated I finally added a disclaimer to this blog but I am applying it retroactively ;).

A is for APEX and Accordion

I had someone internal at Oracle ask for an Accordion widget in APEX. I figured everybody else code use something like this so I figured I'd build out an example in the standard place.

I think the best and easiest way to do this is to base it on a Report Row Template.

There are some caveats to this example.

The first being that #REGION_STATIC_ID# isn't properly substituted in a Report Row Template, I put it in anyway since at some point it will be. All you have to do is surround the report with element with an id or give the report itself an id , this actually isn't a bad idea as I figure most people will only want one of these per page.

The second is if you put multiple accordions on a page the row id has to be unique which is pretty easy to do in the SQL statement.

The accordian can be instatied on page load like this
pAccordian = new Accordion('accordion',true);

The first parameter is the id for the surrounding element.
The second parameter chooses between firing onmouse over (true) or onclick (false).

So here you go,


While I do greatly enjoy the company of of my niece and nephews I do only have a set amount of time before I start getting crazy ideas in my head.

So for future warning I will take a nice normal child, say for instance one that looks like this

I will take him to Supercuts

And I will return you this

Plus now there is a 99% chance his brother wants the same haircut. Let this be a lesson to you.

Just a quick post on a handy online tool.

JSLint while writing javascript sometimes it's easy to take short cuts like if statements without brackets or not ending your lines with semicolons. Plus it's just nice knowing that your dotting your i's and crossing your t's.

I've used it before but after seeing again all the small errors in some of my javascript I've decided to specifically run all my code through it now as a practice.

Documentation :

Tool :

That's right people I've I have the hottest new product for the Oracle APEX community available now!

With some all new functionality but with that slick old school style.

You will receive a working AJAX based ranking system, a AJAX based commenting system (aka: shoutbox) and an reworked AJAX Collection Control (that actually works) plus many other features and enhancements.


Starting with this version I'll also throw in a SQL scripts to install and deinstall all the objects needed to support this application , that's right no more hunting from page to page making sure the examples have the proper tables or procedures! You might ask yourself how can this get any better?


Sample Data! That's right not only do you get the application! Not only do you get the supporting schema objects! But if you act now you will get your very own copy of the sample data as seen on the Original OTN Sample Application

And what would you expect to pay for this? Hundreds? Thousands? No this is provided to you the people for free thats right absolutely free what can be a better deal than that!

Oh and I'll throw in a readme.txt file as well just because I like you ;)

Pick yours up today.

Some new/old code.

As posted here I've updated the code for the wiki in the sourceforge project.

I'll be working on this as time permits over the next couple weeks to see if I can get it in a more workable/polished up state.

The toughest part as I've stated before is getting the Regular Expressions working right. I just don't have enough experience with them and it gives me different results depending on if I run it in sqlplus comparative to SQL Developer comparative to a PL/SQL function call in APEX. So any help or insite into this black art would be awesome.

So instead of continuing to bang my head on the wall over that (day after day) I'm going to be adding other features like a proper versioning system , file attachment to topics and better reporting and searching and organization features.