Step 2: Create view link between CategoryViewObj and ProducerViewObj using CategoryId and ProducerViewObj and ProductViewObj using ProducerCode

Figure: 5

Figure: 6

Step 3: Wrap all ViewObjects and ViewLinks in application module like below.

Drag "CategoryViewObj" under ProductAppModule and named it CategoryViewInstance. Drag the viewlink immediate below it and put it under CategoryViewInstance and renamed it to "ProducerInstance" and drag the view link immediate below of "ProducerViewObj" and put it under "ProducerInstance".

Figure: 7

Step 4: Create ADF tree table by dragging "CategoryViewInstance" from data control palate and add its two level of children by clicking green add button adjacent to it. We can select our own display attributes for each level like below.

Figure: 8

Figure: 9

Figure: 10

Modify nodestamp facet under ADF treetable component like below.

Figure: 11

Add columns like below

Figure: 12

While testing the page we face this error.

<RegistrationConfigurator><handleError> Server Exception during PPR, #1 java.lang.IllegalStateException: ADFv: Not inside a container. at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.exitContainer(FacesCtrlHierBinding.java:672) at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.getRowIndex(FlattenedTreeCollectionModel.java:109) at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$1.getRowIndex(TreeRendererUtils.java:552) at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.handleExpand(TreeTableRenderer.java:520)

This will come because we did not set any key attribute in our view objects and ADF tree table is not able to find row index. So we need to set key attributes to our view objects like below.