Stack Exchange
p:treeTable not sending on sub-node
I use PrimeFaces with a p:treeTable:
root
  Area
    Equipment 1
    ...
    Equipment n
  Area 2
    Equipment 1
    ...
    Equipment n

public TreeNode getRoot() {
    DefaultTreeNode root = new DefaultTreeNode("Root", null);
    for (Area area : areas) {
        TreeNode areaNode = new DefaultTreeNode("area", new AreaTreeNode(area), root);
        root.getChildren().add(areaNode);
        for (Equipment e : equipments) {
            TreeNode eNode = new DefaultTreeNode("equipment", new EquipmentTreeNode(e), areaNode);
            areaNode.getChildren().add(eNode);
        }
    }
    return root;
}

Where AreaTreeNode and EquipmentTreeNode both extend from MipTreeNode which is simply a serializable bean.
In my .xhtml file, I define:
<p:treeTable value="#{equipmentsView.root}" var="node" selectionMode="single">
    <p:column headerText="Name">
        <h:outputText value="#{node.name}" />
    </p:column>
    <p:column>
        <p:commandLink value="edit" actionListener="#{equipmentsView.edit(node)}" />
    </p:column>
</p:treeTable>

So, when I click the commandLink I want to call the edit method with the current node:
public void edit(final MipTreeNode n) {
    System.out.println(n);
}

My problem is that the above method is only called for AreaTreeNode and not for EquipmentTreeNode. Did I miss anything?

"Did I miss anything?" You missed at least version info... And what did you debug? There is a lot to investigate between the click on the button and the actual method call (network traffic etc)

Any progress here?

p:treeTable does not support drag and drop

Ok, that's a different story. Anyhow, thanks for your reply.

The p:treeTable has two very similar attributes. And the docs are not that clear about the difference:

var Name of the request-scoped variable used to
  refer each treenode.
nodeVar Name of the request-scoped variable that'll be
  used to refer current treenode using EL.

In my experience with PrimeFaces 5.3 var refers to the data model object recievable via TreeNode.getData() and nodeVar refers to the actual TreeNode instance. Maybe you can use the latter and unwrap your bean in your edit method?
