5 Replies Latest reply on Jan 21, 2009 10:33 AM by Ilya Shaikovsky

    problem with richfaces tree menu

    safa said Newbie

      Good Morning,
      I'm trying to create a tree menu with richfaces, but the menu wasn't shown

      My JSF code:

      <rich:tree style="width:300px"
       value="#{parc.tree}" var="item">
       <h:outputText value="#{item.id}" />

      My ParcList Class:

      public class ParcList extends EntityQuery {
       private static final String[] RESTRICTIONS = {};
       private Parc parc = new Parc();
       public String getEjbql() {
       return "select parc from Parc parc";
       public Integer getMaxResults() {
       return 25;
       public Parc getParc() {
       return parc;
       public List<String> getRestrictions() {
       return Arrays.asList(RESTRICTIONS);
       @In EntityManager entityManager;
       TreeNodeImpl parcTree=null;
       public void setTree(){
       List<Parc> parc = entityManager.createQuery("from Parc").getResultList();
       Iterator iter = parc.iterator();
       while (iter.hasNext()) {
       parcTree.addChild((Parc)iter.next(), parcTree);
       public List getTree(){
       List <Parc> parcs = (List<Parc>) parcTree;
       return parcs;

      and My entity class:

      @Table(name = "parc", schema = "public")
      public class Parc implements java.io.Serializable {
       private int id;
       private AireProtegee aireProtegee;

      I use seam 2.0.3

      I really need your help,