2 Replies Latest reply on Apr 27, 2009 6:11 PM by ezanih

    RichFaces Tree component - direct assigning of variable (not

    ezanih

      Hello there

      I am new to RichFaces and I want to use the RichFaces Tree control 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:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       template="template.xhtml"
       xmlns:a4j="http://richfaces.org/a4j">
      
      <ui:define name="body">
      
      <h:form>
      <rich:tree switchType="client" style="width:300px" nodeFace="simpleNode" binding="false">
       <rich:treeNode type="simpleNode" ><h:outputText value="Node No.1" /></rich:treeNode>
       <rich:treeNode type="simpleNode" ><h:outputText value="Node No.2" /></rich:treeNode>
       <rich:treeNode type="simpleNode" ><h:outputText value="Node No.3" /></rich:treeNode>
      </rich:tree>
      </h:form>
      
      </ui:define>
      
      </ui:composition>
      


      I saved it under tree.xhmtl and setup Seam and Facelets correctly (all the other xhtml pages are being displayed correctly) but I do not see any tree.

      My question is : is it possible to use the Rich Faces tree menu directly like above or does it have to be bound to some list or collections as in:

      <rich:treeNode type="simpleNode" ><h:outputText value="#{list.member}" /></rich:treeNode>

      If it only works bounded to a list or collection, I may have to use a Javascript or DHTML tree control. Many thanks in advance for your help!