I am using primefaces 5.0.
index.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Prime tree</title>
</h:head>
<h:body>
<h:form style="width: 500px;">
<p:treeTable value="#{treeTableManagedBean.root}" var="node">
<p:column>
<f:facet name="header">
Name
</f:facet>
<h:outputText value="#{node.name}"></h:outputText>
</p:column>
<p:column>
<f:facet name="header">
Value
</f:facet>
<h:inputText value="#{node.value}"></h:inputText>
</p:column>
</p:treeTable>
</h:form>
</h:body>
</html>
above code is suppose to populate treetable with leaf and root but now only showing Name and Value
TreeTableManagedBean.java
public void createRootAndLeafNode() {
//*****Node 1*****//
// Create Documents TreeNode
TreeNode singleScanRoot = new DefaultTreeNode(new Document("SingleScan",""), this.root);
TreeNode handlingCodesRoot = new DefaultTreeNode(new Document("HandlingCodes",""), this.root);
TreeNode relationShipGroupRoot = new DefaultTreeNode(new Document("RelationShipGrp",""), this.root);
// Populate Document Instances
Document trackingNumber = new Document("TrackingNumber" , expressTrack.getTrackingNumber());
// Create Document TreeNode
TreeNode document01 = new DefaultTreeNode(trackingNumber, singleScanRoot);
//*****Node 2*****//
Document handlingCodeDOC = new Document("Handling code" , handlingCode.getHandlingCode());
Document handlingCodeDescDOC = new Document("Handling code description",handlingCode.getHandlingDescription());
TreeNode documentss01 = new DefaultTreeNode(handlingCodeDOC, handlingCodesRoot);
TreeNode documentss02 = new DefaultTreeNode(handlingCodeDescDOC, handlingCodesRoot);
TreeNode relationShipGroupSubRoot = new DefaultTreeNode(new Document(ralationShipGRP.getRelationshipCode().toString(),""), relationShipGroupRoot);
Document relationshipGrpSearchPrimaryTime = new Document(ralationShipGRP.getRelationshipCode().toString(),"");
TreeNode relationShipGrpChild01 = new DefaultTreeNode(relationshipGrpSearchPrimaryTime, relationShipGroupSubRoot);
/*getRelationshipCode*/
}
I was not able to figure out source of error.