Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6584375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:31:48+00:00 2026-05-25T16:31:48+00:00

I want to create dynamic tree in seam with using richfaces recursiveTreeNodesAdaptor.My entity classes

  • 0

I want to create dynamic tree in seam with using richfaces recursiveTreeNodesAdaptor.My entity classes is here ;

@Entity
public class Category extends Item implements Serializable {

private static final long serialVersionUID = -1154500438874768209L;
private List<Item> children;

public void addChild(Item child) {
    if (children == null) {
        children = new ArrayList<Item>();
    }

    if (!children.contains(child)) {
        children.add(child);
    }
}

@OneToMany(cascade = CascadeType.ALL)
public List<Item> getChildren() {
    return children;
}

public void setChildren(List<Item> children) {
    this.children = children;
}
}

 @Entity
 public class Product extends Item implements Serializable {  
    private static final long serialVersionUID = 3975153531436996378L;
 }

 @Inheritance(strategy = InheritanceType.JOINED)
 @Entity
 public class Item {
 private String name;
 private Long id;

 @Id
 @GeneratedValue
 public Long getId() {
    return id;
 }

 public void setId(Long id) {
    this.id = id;
 }

 public String getName() {
    return name;
 }

 public void setName(String name) {
    this.name = name;
 }
}

and i use this class into here;

@Name("provider")
@Scope(ScopeType.APPLICATION)
public class OrganisationProvider implements Serializable {


private static final long serialVersionUID = 1L;

    public Category organization;

public OrganisationProvider() {
    if (organization == null) {
        setOrganization(createOrganization());

    }

}

public Category createOrganization() {
    Category ROOT = new Category();
    Category computerC = new Category();
    Category printerC = new Category();
    Category telephoneC = new Category();

    Product product = new Product();

    ROOT.setName("ROOT");
    computerC.setName("BilgisayarC");
    printerC.setName("YazıcılarC");
    telephoneC.setName("TelephoneC");

    computerC.addChild(printerC);

    ROOT.addChild(computerC);
    ROOT.addChild(product);

    return ROOT;
}

public void setOrganization(Category organization) {
    this.organization = organization;
}

public Category getOrganization() {
    return organization;
}
}

and my .xhtml page is ;

    <ui:define name="body">
    <h:form>
        <rich:panel id="dynamicTreePanel"
            header="Dynamic Tree User Interface">

            <rich:tree>
                <rich:recursiveTreeNodesAdaptor roots="#{provider.organization}"
                    var="rootOrg">
                    <rich:treeNode>
                        <h:outputText value="#{rootOrg.name}" />
                    </rich:treeNode>

                    <rich:recursiveTreeNodesAdaptor roots="#{rootOrg.children}"
                        var="childOrg" nodes="#{childOrg.children}">
                        <rich:treeNode>
                            <h:outputText value="#{childOrg.name}" />
                        </rich:treeNode>
                    </rich:recursiveTreeNodesAdaptor>

                </rich:recursiveTreeNodesAdaptor>
            </rich:tree>
        </rich:panel>
    </h:form>

</ui:define>

When the deploy page and click the root, I take this error;

javax.faces.FacesException: javax.el.PropertyNotFoundException: /dynamicItemTree.xhtml @23,52 nodes=”#{childOrg.children}”: The class ‘a.b.c.d.Product’ does not have the property ‘children’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:31:48+00:00Added an answer on May 25, 2026 at 4:31 pm

    The tree adaptor is reaching a Product item in one level and tries to read its children. This fails because there is no method getchildren on this class.

    Either prevent calling getchildren in case its a Product or implement a method in Product that always returns null ( or empty array)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create dynamic java classes, I use a template to generate the
I want to create a dynamic queue (using the keyword new ) with an
i want to create a dynamic generated form using javascript, everything works fine, until
I have an .NET 4.0 application using Caliburn.Micro. I want to create a dynamic
I want to create a dynamic variable name using Fortran. The variable name will
I want to create a dynamic array that will look like this, using years:
I want to create dynamic content based on this. I know it's somewhere, as
I want to create dynamic tabPages in TabControl. In each tabPage I create dataGridView
I want to create a Dynamic aspx Page in current solution through code-behind..forexample i
this table i want to create job_id dynamic Jobs Title text Job Description text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.