Wednesday, 3 March 2010

Another Apex 4.0 feature for Forms Developers

Late last year I wrote a post about the new Tree View in Apex 4.0, and how it reminded me of the object navigator in Forms.

After reading Patrick's latest entry regarding Cascading LOVs in Apex 4.0 EA2, it reminded me of one of the things I used to do quite regularly in Forms - repopulate one Select List based on the selection of another, during when-list-changed.

Oracle writes in their Application Tools Statement of Direction that (in context of migration tools)
Instead, Oracle’s strategy is to provide a Java EE development environment exposing similar concepts as Forms and Reports, giving to Forms and Reports developers the opportunity to become productive in a new, but familiar environment

I think this cascading LOV is another example of that.

I defined my first Select List as an LOV with the following select:
select name d, org_id r
from   organisations
where  parent_org_id is null
order by 1

Then in the definition for the second Select List, I designate the Cascading LOV Parent Item, and refer to that item value within my second LOV definition.
Pretty simple. Even easier than Forms. The less AJAX I need to write, the happier I am.


nikita sindwani said...

is it necessary that cascading lov parent item to be kind of LOV?Can it be a simple text box?

Scott Wesley said...

I believe so, since you can basically recreate this functionality with dynamic actions. I think the caveat is the item being refreshed is select list - one item type capable of being refreshed.