treeNodesAdaptor rich:treeNodesAdaptor HtmltreeNodesAdaptor

Component identification parameters

Name | Value
--- | ---
component-type | org.richfaces.TreeNodesAdaptor
component-class | org.richfaces.component.html.HtmlTreeNodesAdaptor
component-family | org.richfaces.TreeNodesAdaptor
tag-class | org.richfaces.taglib.TreeNodesAdaptorTag

## Creating the Component with a Page Tag

To create the simplest variant of rich:treeNodesAdaptor on a page, use the following syntax:

Example:

    ...
    <rich:treeNodesAdaptor var="issue" nodes="#{model.issues}">
    	...
    	<rich:treeNode>
    		<!-- node content -->
    	</rich:treeNode>
    	...
    	<!-- Others nodes -->
    	...
    </rich:treeNodesAdaptor>
    ...

## Creating the Component Dynamically Using Java

Example:

    import org.richfaces.component.html.HtmlTreeNodesAdaptor;
    ...
    HtmlTreeNodesAdaptor myTreeNodesAdaptor = new HtmlTreeNodesAdaptor();
    ...

## Details of Usage

The typical variant of using:

    ...
    	<rich:tree adviseNodeOpened="#{treeModelBean.adviseNodeOpened}" switchType="client">
    		<rich:treeNodesAdaptor id="project" nodes="#{loaderBean.projects}" var="project">
    			<rich:treeNode>
    				<h:commandLink action="#{project.click}" value="Project: #{project.name}" />
    			</rich:treeNode>
    			<rich:treeNodesAdaptor id="srcDir" var="srcDir" nodes="#{project.srcDirs}">
    				<rich:treeNode>
    					<h:commandLink action="#{srcDir.click}" value="Source directory: #{srcDir.name}" />
    				</rich:treeNode>
    				<rich:treeNodesAdaptor id="pkg" var="pkg" nodes="#{srcDir.packages}">
    					<rich:treeNode>
    						<h:commandLink action="#{pkg.click}" value="Package: #{pkg.name}" />
    					</rich:treeNode>
    					<rich:treeNodesAdaptor id="class" var="class" nodes="#{pkg.classes}">
    						<rich:treeNode>
    							<h:commandLink action="#{class.click}" value="Class: #{class.name}" />
    						</rich:treeNode>
    					</rich:treeNodesAdaptor>
    				</rich:treeNodesAdaptor>
    			</rich:treeNodesAdaptor>
    		</rich:treeNodesAdaptor>
    	</rich:tree>
    ...

## Relevant Resources Links

Here you can see the example of <rich:treeNodesAdaptor > usage and sources for the given example.