The p:tree element below is in my Faclets template, so it shows up on every view in my application. The nodeSelectListener will execute an ExternalContext.redirect to a URL depending on what node was selected. This has always worked very well and still works.
The NullPointerException happens now when I do some other navigation by selecting some regular link on the page.
In the page I have:
Code: Select all
<p:tree id="navTreeShelf"
value="#{navigation.navigationTree}"
dynamic="true"
var="node"
selectionMode="single"
nodeSelectListener="#{navigation.onNodeSelect}"
rendered="#{!appBean.dataBaseEmpty}"
style="font-size:75%"
>
<p:treeNode>
<h:outputText value="#{navigation.nodeDisplay(node)}" />
</p:treeNode>
</p:tree>
Code: Select all
java.lang.NullPointerException
at org.primefaces.component.tree.Tree.processUpdates(Tree.java:318)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIForm.processUpdates(UIForm.java:281)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1242)
at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:1231)
at com.sun.faces.lifecycle.UpdateModelValuesPhase.execute(UpdateModelValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
(Thanks in advance as always).