Jsf 树表在primefaces 5.0中不可见

Jsf 树表在primefaces 5.0中不可见,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我使用的是PrimeFaces5.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/x

我使用的是PrimeFaces5.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>

我无法找出错误的来源。

可能重复的“否”不是@jipr311@jipr311:这是OP无法控制的第三方代码。Taufik,不要使用[java]标记,只要使用java应用程序类和
main()
方法无法再现问题。当然,先生,您这边的任何帮助都将不胜感激…@BalusCAs对于具体问题,您的运行时类路径是混乱的。去掉服务器本身已经提供的jar(JSP和Servlet),去掉重复的jar(javax.faces中已经包含了jsfapi和jsf impl)。有关JSF安装说明,请参见。
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*/   
}