0

I want to use PrimeFaces p:menubar it gives me titles whitout any css style dont know why. I use tomcat 9.0 primefaces 6.2 and JSF 2.2.15

this is the menu xhtml page :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xlmns="http://www.w3.org/1999/xhtml"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.org/ui" 
  xmlns:ui="http://java.sun.com/jsf/facelets">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<h:body>
<h:form id="menuForm"> 
<p:growl id="messages"/>

<p:menubar>
    <p:submenu label="File" icon="ui-icon-document">
        <p:submenu label="New" icon="ui-icon-contact">
            <p:menuitem value="Project" url="#" />
            <p:menuitem value="Other" url="#" />
        </p:submenu>
        <p:menuitem value="Open" url="#" />
        <p:separator />
        <p:menuitem value="Quit" url="#" />
    </p:submenu>

    <p:submenu label="Edit" icon="ui-icon-pencil">
        <p:menuitem value="Undo" url="#" icon="ui-icon-arrowreturnthick-1-w" 
    />
        <p:menuitem value="Redo" url="#" icon="ui-icon-arrowreturnthick-1-e" 
    />
    </p:submenu>

    <p:submenu label="Help" icon="ui-icon-help">
        <p:menuitem value="Contents" url="#" />
        <p:submenu label="Search" icon="ui-icon-search">
            <p:submenu label="Text">
                <p:menuitem value="Workspace" url="#" />
            </p:submenu>
            <p:menuitem value="File" url="#" />
        </p:submenu>
    </p:submenu>

   <p:submenu label="Actions" icon="ui-icon-gear">
        <p:submenu label="Ajax" icon="ui-icon-refresh">
            <p:menuitem value="Save" actionListener="#{MenuMB.save()}" 
icon="ui-icon-disk" update="messages"/>
            <p:menuitem value="Update" actionListener="#{MenuMB.update()}" 
icon="ui-icon-arrowrefresh-1-w" update="messages"/>
        </p:submenu>
        <p:submenu label="Non-Ajax" icon="ui-icon-newwin">
            <p:menuitem value="Delete" actionListener="#{MenuMB.delete()}" 
icon="ui-icon-close" update="messages" ajax="false"/>
        </p:submenu>
    </p:submenu>

    <p:menuitem value="Quit" url="http://www.primefaces.org" icon="ui-icon- 
close" />

    <f:facet name="options">
        <p:inputText style="margin-right:10px" placeholder="Search"/>
        <p:commandButton type="button" value="Logout" icon="ui-icon-extlink" 
/>
    </f:facet>
</p:menubar>
</h:form>
</h:body>

 </html>
Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Ouafae
  • 11
  • 1
  • So other PrimeFaces components work? Plain jsf ones work? What did you debug? – Kukeltje May 28 '18 at 16:06
  • datatables worked forms also just that menubar – Ouafae May 28 '18 at 18:26
  • 1
    Please try again with `` and ``. – ForguesR May 28 '18 at 19:07
  • it works i totaly forgot the h;head tag thak you – Ouafae May 28 '18 at 21:22
  • That was where I was heading. No component would have worked in this page. But next time I'll add 'in this page' or 'when added to this page' qhen commenting. Always try thing liKe this. – Kukeltje May 28 '18 at 23:22
  • Duplicate of [PrimeFaces CSS look'n'feel missing and JS "Uncaught Reference Error: PrimeFaces is not defined"](https://stackoverflow.com/questions/14553417/primefaces-css-looknfeel-missing-and-js-uncaught-reference-error-primefaces) – ForguesR May 29 '18 at 11:42

0 Answers0