O'Reilly logo

JBoss RichFaces 3.3 by Demetrio Filocamo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The tree component

The next example will show how to make and use a rich:tree component in an effective way.

First let's create the /view/examples/tree/treeExample.xhtml page, it might look like this:

<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" template="/layout/template.xhtml"> <ui:define name="body"> <h:form> <rich:tree switchType="ajax" value="#{contactsTree}" var="item"> <rich:treeNode iconLeaf="/img/contact.png" icon="/img/files.png"> <h:outputText value="#{item.name}"/> </rich:treeNode> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required