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 8655705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:06:05+00:00 2026-06-12T15:06:05+00:00

I am using <p:tree> . and trying to use <p:ajax> to detect the node

  • 0

I am using <p:tree>. and trying to use <p:ajax> to detect the node selected and excecute action. This is my actual JSF code:

<p:tree id="treeDot" value="#{beanRequest.rootDot}" var="node"  selectionMode="single"
    nodeSelectListener="#{beanRequest.clt}" >
    <p:ajax event="select" listener="#{beanRequest.clientSelected}" />
        <p:treeNode>
            <h:outputText value="#{node}" />
        </p:treeNode>
</p:tree>

The server side method:

//...
private Client clt;
public void clientSelected(NodeSelectEvent event) {
    //...
}
//...

I get the following exception :

8 oct. 2012 17:30:01 com.sun.faces.context.PartialViewContextImpl processPartial
INFO: java.lang.NullPointerException
java.lang.NullPointerException
    at org.primefaces.component.api.UITree.findTreeNode(UITree.java:111)
    at org.primefaces.component.api.UITree.setRowKey(UITree.java:78)
    at org.primefaces.component.tree.TreeRenderer.decodeSelection(TreeRenderer.java:62)
    at org.primefaces.component.tree.TreeRenderer.decode(TreeRenderer.java:38)
    at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
    at org.primefaces.component.api.UITree.processDecodes(UITree.java:170)
    at org.primefaces.component.tree.Tree.processDecodes(Tree.java:366)
    at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506
)
    at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
    at org.primefaces.component.api.UITree.visitTree(UITree.java:392)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at org.primefaces.component.tabview.TabView.visitTree(TabView.java:400)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
    at javax.faces.component.UIForm.visitTree(UIForm.java:371)
    at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
  • 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-06-12T15:06:06+00:00Added an answer on June 12, 2026 at 3:06 pm

    I found the mistake.
    just replace nodeSelectListener="#{beanRequest.clt}" by
    selection="#{beanRequest.selectedNode}"
    and create the selecttedNode variable in the beanRequest like this
    private TreeNode selectedNode;

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

Sidebar

Related Questions

I am using a jQuery Ajax control from this site http://abeautifulsite.net/2008/03/jquery-file-tree/ I have it
Just trying to use Java to rename the root of a folder tree. Using
I'm trying to use boost's prim's algorithm to find the minimum spanning tree using
I am trying to test our source tree using PHPUnit with old, web based
I'm trying to make a decision tree using rpart using a data frame that
Problem: I am trying to build a recursive tree using a function and data
I've been using seesaw.tree/simple-tree-model to create my TreeModels, the docs say that this is
My project is to implement minimum spanning tree using java. I aim to use
I am trying to parse a C-function like tree expressions like the following (using
I want to use the zsh-git-prompt, from this repo https://github.com/olivierverdier/zsh-git-prompt , I've been using

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.