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

  • SEARCH
  • Home
  • 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 5999741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:35:42+00:00 2026-05-23T00:35:42+00:00

I am using JSF2.0 with Richfaces 4.0.0.Final for a web application. I have a

  • 0

I am using JSF2.0 with Richfaces 4.0.0.Final for a web application. I have a im using for navigation. When I click on a node in the tree my selectionListener should navigate me to the page associated with that node. But when I click on a node I get a NullPointerException:

SEVERE: java.lang.NullPointerException
javax.faces.FacesException: java.lang.NullPointerException
    at org.richfaces.component.UIDataAdaptor.invokeOnComponent(UIDataAdaptor.java:1124)
    at org.richfaces.renderkit.TreeRendererBase.decode(TreeRendererBase.java:208)
    at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
    at org.richfaces.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:824)
    at org.richfaces.context.PartialViewExecuteVisitCallback.visit(PartialViewExecuteVisitCallback    .java:55)
    at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:337)
    at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1235)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
    at javax.faces.component.UIForm.visitTree(UIForm.java:344)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
    at org.richfaces.context.ExtendedPartialViewContextImpl.executeComponents(ExtendedPartialViewContextImpl.java:249)
    at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialExecutePhase(ExtendedPartialViewContextImpl.java:229)
    at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:208)
    at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
    at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at org.richfaces.model.ClassicTreeNodeDataModelImpl.setupChildContext(ClassicTreeNodeDataModelImpl.java:49)
    at org.richfaces.model.ClassicTreeNodeDataModelImpl.setupChildContext(ClassicTreeNodeDataModelImpl.java:35)
    at org.richfaces.model.NodesTreeSequenceKeyModel.setupKey(NodesTreeSequenceKeyModel.java:47)
    at org.richfaces.model.TreeSequenceKeyModel.setRowKey(TreeSequenceKeyModel.java:49)
    at org.richfaces.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:277)
    at org.richfaces.component.UIDataAdaptor.invokeOnComponent(UIDataAdaptor.java:1111)
    ... 43 more

I have no clue what is causing this error.

Here is my code:

xhtml:

<h:form id="richSideBarForm" >
        <rich:tree  id="richTreeBar" value="#{richTree.rootNode}"  var="node" toggleType="client" selectionType="ajax" nodeType="#{node.type}"
                 iconExpanded="/resources/images/FolderOpen_web.png" iconCollapsed="/resources/images/FolderClosed_web.png"
                 iconLeaf="/resources/images/Worksheet_web_mini.png" selectionChangeListener="#{richTree.processTreeSelectionChange}">
            <rich:treeNode id="rootNode" type="folder" iconExpanded="/resources/images/FolderOpen_web.png" iconCollapsed="/resources/images/FolderClosed_web.png">
                <h:outputText id="rootNodeOutput" value="#{node}" />
            </rich:treeNode>
            <rich:treeNode id="leafNode" type="leaf" iconLeaf="/resources/images/Worksheet_web_mini.png"  >
                <h:outputText id="leafNodeOutput" value="#{node}" />
            </rich:treeNode>
            <rich:treeNode id="leafNode" type="location" iconExpanded="/resources/images/HOME_webHI.png" iconCollapsed="/resources/images/HOME_webHI.png" >
                <h:outputText id="leafNodeOutput" value="#{node}" />
            </rich:treeNode>
        </rich:tree>
    </h:form>

I dont know if it is important but the navigation tree is part of one xhtml file which is being included in my template using a tag

BackingBean:

public class RichTree implements Serializable, TreeSelectionChangeListener{

private TreeNode rootNode;
private UITree treeBinding;

public RichTree() {
    rootNode = new TreeNodeImpl();
    loadTree();
}

/**
 * @return the rootNode
 */
public TreeNode getRootNode() {
    return rootNode;
}

public void setRootNode(TreeNode rootNode) {
    this.rootNode = rootNode;
}

private void loadTree() {
    AGOTreeNode summaryNode = new AGOTreeNode();
    summaryNode.setLabel("0000000001");
    getRootNode().addChild(0, summaryNode);
    AGOTreeNode childNode = new AGOTreeNode();
    childNode.setLabel("Node1");
    childNode.setNavigation("page1");
    summaryNode.addChild(0, childNode);
    childNode = new AGOTreeNode();
    childNode.setLabel("Node2");
    childNode.setNavigation("page2";
    summaryNode.addChild(1, childNode);
}

@Override
public void processTreeSelectionChange(TreeSelectionChangeEvent tsce) throws AbortProcessingException {
    List<Object> selection = new ArrayList<Object>(tsce.getNewSelection());
    Object currentSelectionKey = selection.get(0);
    UITree tree = (UITree) tsce.getSource();
    tree.setRowKey(currentSelectionKey);
    AGOTreeNode node = (AGOTreeNode) tree.getRowData();
    String nav= node.getNavigation();
    FacesContext fc = FacesContext.getCurrentInstance();
    fc.getApplication().getNavigationHandler().handleNavigation(fc, "", nav);
}

AGOTreeNode extends TreeNodeImpl and adds a few feilds and also overwrites the toString method.

Any Help is greatly appreciated!

-Doug Costa

  • 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-23T00:35:43+00:00Added an answer on May 23, 2026 at 12:35 am

    I managed to get my application working. I added rowKeyConverter="org.richfaces.IntegerSequenceRowKeyConverter" to my <rich:tree which seems to have overcome the issue and is calling my selection listener.

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

Sidebar

Related Questions

I'm using RichFaces on my JSF2 application, and I need a way to have
I have a web project using jsf2 implementing a gaming web site on tomcat7.
I have a JSF 2 application which uses a Richfaces 4 tree control. The
Im working in a web application using JSF 2 and richFaces 4 and I
I have a web app using JSF2 with JPA Entities, Stateless ejb session beans
I'm developping a web app, with jsf2,spring and hibernate. I have an application scoped
I'm using JSF2 and Richfaces 4. I've added the following to my web.xml: <mime-mapping>
Im developping a web application using JSf 2 and RichFaces 4 . I use
I am using JSF2.0 and Glassfish v3. I have a ValidatorMessage.properties file under WEB-INF>Classes
In JSF application we are using richfaces (Final.3.3.3). In pom.xml there is dependency on

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.