Sunday, March 25, 2012

ADF Radio Group inside an af tree table through a transient attribute. LOV with static values. ADF BC 11g

Hi,

in this example we are going to show how to create a radio Group inside a table tree.

for this example we are going to show how easy it is to add an attribute as a single selection (Radio Group) inside a tree table.

In this example we are going to use the HR Schema and the following tables:

Departments and Employees.
JDeveloper 11.1.1.6.0.

Donwload Sample Application.

The case is simple. We will simply create a static LOV and we are going to attach it to a transient attribute that we will create in the Employees View Object.
The reason of this approach is to try just slightly different things.. :)

The Business Components created through JDeveloper Wizard


Next, we are going to create the static list of Values:



Then we are to create the attributes of this static LOV




Setting the primary key

 inserting the static data:


Then, we are going to assign this LOV to our transient attribute


Here we have a specific case. In order for the application to work properly, we have to have the transient attribute created to the Entity first and carried on to the View Object. I am planning to investigate on that, because it seems to me that having the transient attribute only on the View Object causes problems. I will come back with a separate post for this matter. But until I clarify things, lets just say that we create a transient attribute in the Entity and we added to our View Object.



Then, we map the attributes:


Next,  we change the UI hints for this LOV


Next, we update our pageDef in order to include the new transient attribute:


Update the page:


NOTE: in order to  add columns in a tree table, you have to add them on your own, Andrejus Baranovskis has published a post here.

The valuepassThru  option here is because we would have class cast exception in this example. It all depends on how you will create your LOV.

And that is pretty much it.

Download Sample Application.

Regards.

No comments:

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...