Hi
I'm using the tomahawk tree2 component and are getting a really random
error. I have tried the 1.1.5 snapshot and 1.1.3 and get the same error.
The tree will load but when you click to expand a node the following
error is thrown:
java.lang.NullPointerException
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.restoreStateFromCookies(HtmlTreeRenderer.java:83)
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.decode(HtmlTreeRenderer.java:128)
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:657)
org.apache.myfaces.custom.tree2.UITreeData.processDecodes(UITreeData.java:175)
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:872)
javax.faces.component.UIForm.processDecodes(UIForm.java:144)
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:872)
javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:306)
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
My JSF as follows:
<t:tree2 value="#{Navigator.tree}" var="node"
varNodeToggler="t" clientSideToggle="false" showRootNode="true">
<f:facet name="ROOT" >
<h:outputText
value="#{node.name}" />
</f:facet>
<f:facet name="PAGES" >
<h:outputText
value="#{node.name}" />
</f:facet>
<f:facet name="PAGE" >
<h:outputText
value="#{node.name}" />
</f:facet>
</t:tree2>
and section from my bean :
public TreeModel getTree()
{
if (this.tree == null)
{
this.tree = new TreeModelBase(new RootNode(this.getAuthor())) ;
}
return this.tree ;
}
public void setTree(TreeModel tm)
{
this.tree = tm ;
}
where RootNode laods from a database a list of nodes.
I really need help on this one.
Chris Ellis