Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery JSF ui中的Render PrimeFaces MegaMenu:composition_Jquery_Jsf_Jsf 2_Primefaces - Fatal编程技术网

Jquery JSF ui中的Render PrimeFaces MegaMenu:composition

Jquery JSF ui中的Render PrimeFaces MegaMenu:composition,jquery,jsf,jsf-2,primefaces,Jquery,Jsf,Jsf 2,Primefaces,我有以下JSF代码片段,其中包含ui:composition标记,使用一个工作正常的自定义组件—包含所有这些信息的文件称为header.xhtml <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:projsfhtml5="http://xmlns.jcp.org/jsf/composite/projsfhtml5">

我有以下JSF代码片段,其中包含ui:composition标记,使用一个工作正常的自定义组件—包含所有这些信息的文件称为header.xhtml

    <html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
     xmlns:projsfhtml5="http://xmlns.jcp.org/jsf/composite/projsfhtml5">
    <ui:composition>
       <!-- Include Prime Faces mega menu here -->  
       <projsfhtml5:navbar label="Mega App"
       value="#{request.contextPath}/protected/pages/bookSearch.xhtml">
   <projsfhtml5:navitem label="Contact Us"
        value="#{request.contextPath}/public/pages/contactUs.xhtml" />
    <projsfhtml5:navitem label="About"
        value="#{request.contextPath}/public/pages/about.xhtml" />
    </projsfhtml5:navbar>

    <div class="page-header">
    <h1>
    <ui:insert name="headerText">Welcome to the online library</ui:insert>
    </h1>
    </div>
     </ui:composition>
 </html>
该文件又是simple.xhtml模板的一部分,该模板用作站点中许多页面的模板

 <?xml version='1.0' encoding='UTF-8' ?>
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:h="http://xmlns.jcp.org/jsf/html">

  <h:head>
 <title><ui:insert name="title">Welcome</ui:insert></title>
 <meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
     <ui:include src="common/bootstrapCSS.xhtml" />   
   </h:head>

   <h:body>
  <div class="container">
    <ui:insert name="header">
        <ui:include src="common/header.xhtml" />
    </ui:insert>

    <ui:insert name="content"></ui:insert>

    <ui:insert name="footer"></ui:insert>
</div>

<ui:include src="common/bootstrapJS.xhtml" />
    </h:body>
    </html>
我希望最后做的是代替header.xhtml中的projsfhtml5:navitem标记,我希望呈现prime faces mega菜单元素,以便使用它来显示菜单项-这似乎可行,即呈现部分,但菜单无法正确展开,无法单击任何选项。有没有人试过或有过这样的经历


谢谢

我解决了自己的问题-我将删除此问题。