Monday, August 25, 2008

How to make the Oracle Apex calendar start with Monday

BHavesh recently asked on my blog how to get a date picker which shows Monday as the first day.
The default apex date picker shows Sunday as first day. But I can see on your example, the default apex date picker has Monday as first day. Is there a way I can also make my default apex date picker to show monday as first day.
Good question BHavesh, I wasn't entirely sure how I did it either. It wasn't a conscious decision on my part, but a quick look with session debugging on revealed the answer, as you can see in the image below.
The NLS_TERRITORY is set to "AUSTRALIA". A quick look in the manual revealed
NLS_TERRITORY specifies the name of the territory whose conventions are to be followed for day and week numbering.

This parameter also establishes the default date format, the default decimal character and group separator, and the default ISO and local currency symbols.

So there's your answer - the territory setting establishes the week numbering. And where to set it in Oracle Apex? See below.

Friday, August 15, 2008

Oracle Apex - AJAX form created from Javascript

One of the really nice features of using ExtJS is just how easy it is to create a form using javascript.

Combining it with the new Apex global variables which Carl Backstrom blogged about in May gives some very interesting opportunities.

It means it is now possible to have functionality sitting in a application javascript library ready for use on every page.
This is exactly what is happening in IRR reports, and the upcoming Websheets functionality.

Combine this with the ability to interrogate your application using the Apex dictionary views, and suddenly the world is your oyster.

Have a play with AJAX Form using Globals on my demo site.

I'm using the same concept for a AJAX editable tree, which I'll be talking about at Oracle OpenWorld this year.
Provided I finish building it... :)

Here's a screenshot of current progress. Mark