HAI CAN HAS TABULAR FORM CHECKBOX KTHXBYE

Ok, here’s my first blog post in a long while.

It’s well overdue, I know. I spurred myself into doing it by proclaiming my intent over twitter, dangerous – no choice now!

So I’ll start myself off with a short and simple that I came across the other day, hopefully it will help someone.

The PROBLEM… Created a new tabular form in the new theme/framework that I’d been working on. All looked well, my CSS and jQuery theming was looking gorgeous. I was patting myself on the back and considering buying a ‘special’ coffee to celebrate. Then something happened… Or rather, something didn’t. I clicked on the checkbox at the top of the row selector column and I got the first row checkbox selected and A JAVASCRIPT ERROR! What the hell had I done to break such a fundamental function in APEX?

Here’s the exact error from Firebug;

gRowActive[a] is undefined

So, I Google and I hit this link… https://forums.oracle.com/forums/thread.jspa?threadID=2308963 Fantabulous! It’s happened before – a fellow APEX developer has met the same plight and, by golly, they’ve bloody fixed it! What they forgot to do was furnish the rest of us unfortunate souls with their ‘fix’.

The SOLUTION…

Now here we go. It’s not a fix, it’s a hack. because the underlying javascript code from APEX is wrong (sorry – ‘sub optimal’)  - ;)

PUT SOMETHING IN THE… ‘Background color for checked row’

AND IN THE… ‘Background color for current row’

 

Hmm… why should that break it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s