javascript - "PrimeFaces is not defined" error -


i trying print using primefaces printer functionality. have created new glassfish 3 java ee project , added primefaces 3.1.1 .jar file.

the code using follows:

<html xmlns="http://www.w3.org/1999/xhtml"        xmlns:h="http://java.sun.com/jsf/html"       xmlns:p="http://primefaces.org/ui">    <h:head>     <title>facelet title</title>   </h:head>   <h:body>     <h:form>       <h:outputtext id="a" value="aa" />       <h:commandlink id="btn" value="print">         <p:printer target="a" />       </h:commandlink>     </h:form>   </h:body> </html> 

unfortunately, print function isn't working. instead, firebug console shows me following error:

primefaces not defined

if didnt have head tag error.

primefaces requires head tag work.

see #2 on faq

http://primefaces.org/faq.html


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -