We need to have view objects departments, jobs and employees tables (read only will be enough). Also there should be view links between them (on EMP_DEPT_FK and EMP_JOB_FK foreign keys). Model project structure should be similar to this:
Now let us focus more on Application Module Data Model definition. Please click on DepartmentsView and rename New View Instance to Departments and move it right.
Select EmployeesView via EmpDeptFkLink, rename it to Employees and move it as detail of Depatrments instance.
Select JobsView, rename it to Jobs and move it to the right. Now please select EmployeesView via EmpJobFkLink and rename it, the tricky part, to Employees.
An error? Not exactly, it will be the same instance for both Jobs and Departments. So, please click Yes. Data Model and AppModuleDataControl should look like this:
Last thing to do is to prepare test page for it. Please expand Departments node in the AppModuleDataControl, select Employees iterator and drag it to the test page as ADF Master Table, Detail Table.
Then drag and drop Jobs iterator on the test page. Select table with employees and add partial trigger to the Jobs table (partial trigger to Departments table should already be there). My page structure after simple layout rework is:
And if somebody is interested in the page definition:
The running example:
Thanks Kamil. This one really helps.
ReplyDeleteHi Kamil, i don't understand how create the same instance in jdev 12.1.3, because is different version, can you help me.
ReplyDeleteThanks a lot.
Giovanni
@giovanni
DeleteSecond view object instance will be called EmployeesView1. Please go to the source of application module and remove tag. After that please search for the EmployeesView1 string and rename it to Employees. It should be found only in tag. If you've got java implementation of application module, client interfaces and so on you'll need to synchronize them with the xml file.
Nevertheless I'll try to find better, declarative solution for that :)
Delete