1

I have the next piece of code:

<!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:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui">

<h:body>
    <h:form id="sorteoId">
        <p:panel id="pnl" header="Red">
            <h:outputText value="person1" />
        </p:panel>
        <p:draggable for="pnl" />
    </h:form>
</h:body>
</html>

when I run the project the control draggable or any other primefaces' control doesn't work.

Thx for your help!

Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40
Frank
  • 43
  • 4
  • If `p:panel` doesn't show up then check if you have added library or if you use maven check dependency, – Geinmachi Nov 09 '15 at 00:50
  • hi, the library has been added but still without work :/ – Frank Nov 09 '15 at 00:58
  • What is returned by the server as a response and what is the response status? (Right click and then click an option like "View page source" from the sub menu opened. See the HTTP traffic monitor on the "Network" tab for the response status (press F12)). – Tiny Nov 09 '15 at 01:23
  • hi @Tiny this returned: ReferenceError: PrimeFaces is not defined Sorteo:5:1 ReferenceError: $ is not defined – Frank Nov 09 '15 at 01:37
  • PrimeFaces JavaScript does not seem to have been loaded for some reason but does the browser show the correct HTML code corresponding the XHTML file? – Tiny Nov 09 '15 at 01:45
  • the code corresponding the XHTML file is the code I published, I have an only one XHTML file – Frank Nov 09 '15 at 02:18
  • 2
    You need an empty h:head – Jaqen H'ghar Nov 09 '15 at 07:01
  • 1
    A more specific title would also be nice – opfau Nov 09 '15 at 15:31
  • Next time you get an exception/error message, just use it as [search keyword](https://google.com/search?q=Uncaught+Reference+Error%3A+PrimeFaces+is+not+defined) (after removing environment specific details, if any). – BalusC Nov 09 '15 at 20:30
  • the solution is a empty head: – Frank Nov 25 '15 at 04:45

0 Answers0