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
Comments
Post a Comment