I want to display a table with data from a database table called PERSON, so I'm using af:table tag.
The PERSON table has the next fields:
The field PERSON_STATE is a foreign key to other table called PERSON_STATE:
I've created a view to get data from PERSON table (personView). Because I want to show the person state description in the af:table , I've created another view to get data from PERSON_STATE table (personStateView). And I've also created a view link between personView and personStateView.
In the column of the af:table that represents the person state I drop the field 'description' of the state view linked to the person view.
When I run the JSP the state is not shown properly. All the persons are shown with the same state.
When testing directly with the application module, the view link works properly.
Does view links work inside a af:table?
I'm working with ADF 10g.
your PERSON_STATE table doesn't show any foreign key to the Person table. So this needs to be provided. You then create a view link based on this reference. Alternatively you can create a ViewObject based on the two entities (Person and Person_State) to show both information in the same table. For both implementations you need to have a primary key in the PERSON table and a foreign key attribute in the PERSON_STATE table
Thanks for your reply.
The second alternative works, but I would be interested in the first one (using a view link).
The foreign key is defined properly:
PERSON.PERSON_CODE is a primary key.
PERSON.PERSON_COD_STATE is a foreign key.
PERSON_STATE.PERSON_COD_STATE is a primary key.
I have created a view link based on that foreign key.
When usign af:table to show the records of PERSON table, all the data of PersonView is properly shown. But the STATE of the person is not ok. It seems as the view link is not working.