First page Back Continue Last page Text

oracle adf workshop

Notes:


Providing Data for Trees

The ADF Faces tree component uses a stamping strategy similar to the ADF Faces table component. The nodeStamp facet of the tree is used to display the data for each element in the tree. The tree does not create components for each element; instead, the nodeStamp is repeatedly rendered (stamped) once for each element. Because of this stamping behavior, only certain types of components are supported as children inside an ADF Faces tree. All components that have no behavior are supported, as are most components that implement the ValueHolder or ActionSource interfaces.

Each time the nodeStamp is stamped, the data for the current element is copied into a property that can be addressed using an EL expression. You specify the name to use for this property in the var property on the tree. After the table has completed rendering, this property is removed or reverted back to its previous value.

In the example in the slide, the data for each element is referenced using the variable node, which identifies the data to be displayed in the tree. The nodeStamp facet displays the data for each element by getting further properties from the node variable.