Skip to main content

Posts

Showing posts from November, 2010

ADF 11g : Change a Viewobjects' Query on the Fly

One of the requirements at my current project is to have one ADF table display data from different database tables. That is, depending on criteria entered by the user, the query behind the view object needs to change. All in all 12 different database tables are involved in this story. This requirement is based on functionally in the original (oracle forms) application. This forms application used the set_block_property built-in: set_block_property('<blockName>, query_data_source_name, <datasource>); I was able to reproduce this behavior in an ADF application. In this post I explain how I did this. Database and ADF Business Components. Luckily these tables all have the same attributes so it is relatively easy to achieve this. I created two database views. One based on the employees table, and a second one based on the locations table. Mark that I defined identical column aliases for both views. create view EMP_ABSTRACT_VW as select EMPLOYEE_ID IDENTIFIER, FIRST...

ADF 11g : SelectOneRadio in Table Layout

Today at one of my customers I was asked the question if you can use a SelectOneRadio component in table layout. I know that the first thing they should have done is try Google to find a solution. As a matter of fact they did and found this blogpost by Frank Nimphius. This however is based on ADF 10g. The part where Frank converts the InputText to a selectOneRadio isn't available in ADF 11g anymore. It can be achieved in ADF 11g very simple as well. Based on an example I will explain how to do this in ADF 11g. For this I added an extra column to the EMPLOYEES table. This column called "OutOfOffice" holds the status of the selected employee. I created ADF BC for the Employees table. When dropping this as an ADF table you will see the result as below. Not user-friendly at all. But how can we change this ? Actually it's simple. First remove the inputText field from the column. Next drop the OutOfOffice attribute from the datacontrol on the column as a selectOneRadio. I...