-
1. Re: recursiveTreeNodesAdaptor doesn't recurse
nbelaevski Oct 19, 2008 6:33 PM (in response to khisanthmagus)Hi,
Can you please add code for TaxonomyAction/Taxonomy beans and related classes? -
2. Re: recursiveTreeNodesAdaptor doesn't recurse
khisanthmagus Dec 12, 2008 11:52 AM (in response to khisanthmagus)Sorry I didn't reply back to this...I tried doing the tree a different way which worked but suffered from severe performance issues, so I'm back to trying this.
Relevant code from ProgramTaxonomyActionpublic Set<Taxonomy> getTaxonomies() { Program program = programService.getProgramByID(userBean.getCurrentProgram()); taxonomyBean.setMode(ProgramTaxonomyBean.DISPLAY_MODE); return program.getTaxonomiesByType(taxonomyBean.getTaxonomyCategory()); }
This returns the set of the root nodes of the tree. Nothing else in that action bean is really relevant.
TaxonomyImpl.java:package org.act.vsl.beans.metadata.classification; import java.util.HashSet; import java.util.Set; import org.act.vsl.beans.Program; import org.act.vsl.beans.VSLObjectImpl; public abstract class TaxonomyImpl extends VSLObjectImpl implements Taxonomy { private String code; private String description; private Taxonomy parent; private Set<Taxonomy> childTaxonomies; private Program program; private boolean isOrganize; public TaxonomyImpl() { } public void setCode(String code) { this.code = code; } public String getCode() { return code; } public void setDescription(String description) { this.description = description; } public String getDescription() { return description; } public void setParent(Taxonomy parent) { this.parent = parent; } public Taxonomy getParent() { return parent; } public void setChildTaxonomies(Set<Taxonomy> childTaxonomies) { this.childTaxonomies = childTaxonomies; } public Set<Taxonomy> getChildTaxonomies() { if (childTaxonomies == null) { childTaxonomies = new HashSet<Taxonomy>(); } return childTaxonomies; } public void setProgram(Program program) { this.program = program; } public Program getProgram() { return this.program; } public void setIsOrganize(boolean isOrganize) { this.isOrganize = isOrganize; } public boolean getIsOrganize() { return isOrganize; } }
-
3. Re: recursiveTreeNodesAdaptor doesn't recurse
khisanthmagus Dec 12, 2008 12:15 PM (in response to khisanthmagus)Is there any chance that the child nodes being lazy loaded by hibernate could be the problem? I don't see HOW it could be the problem, but it is the only thing I can think of.
-
4. Re: recursiveTreeNodesAdaptor doesn't recurse
khisanthmagus Dec 12, 2008 12:30 PM (in response to khisanthmagus)Apparently that isn't it either. I turned off lazy loading of the taxonomy children and tested with a smaller tree and it still would not go any deeper.
The tree I tested it with has a very simple structure:
Content 1-1
|- Content 1-2
|- Content 1-3
|- Content 1-4
|- Content 1-5
It will display content 1-1 fine, but then displays content 1-2 as a leaf node. -
5. Re: recursiveTreeNodesAdaptor doesn't recurse
khisanthmagus Dec 15, 2008 3:29 PM (in response to khisanthmagus)Apparently this had something to do with the server I was using. This problem happens when I run the application through JDeveloper, but when I deploy the app to a regular OC4J container it works normally.