Instalar PrimeFaces no JSF 2.0

Pessoal, eu baixei várias versões do PrimeFaces e adcionei os jar’s no meu projeto…

Então coloquei:

xmlns:p="http://primefaces.prime.com.tr/ui"

e

<%@ taglib uri="http://primefaces.org/ui" prefix="p" %>

e coloquei um código do primefaces no meu jsf:

<p:remoteCommand name="lazyload" update="dt1"> <f:setPropertyActionListener value="#{true}" target="#{JAPListBean.listAP}" /> </p:remoteCommand>

tentei colocar <p: e apertar CTRL+ESPAÇO, e não mostrou nenhuma opção do primeface. Quando eu fui executar o código, deu a seguinte mensagem:

An exception occurred processing JSP page /admin/ap_info.jsp at line 230 227: </h:dataTable> 228: 229: <p:remoteCommand name="lazyload" update="dt1"> 230: <f:setPropertyActionListener value="#{true}" target="#{JAPListBean.listAP}" /> 231: </p:remoteCommand> 232: </h:form> 233: </f:view> Stacktrace:
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: The setPropertyActionListener tag should be nested within a tag that is associated with a component of type javax.faces.component.ActionSource.

meu servidor web é o JBOSS 6 e JSF 2.0…

O setPropertyActionListener deve estar dentro de uma tag source , por exemplo commandButton ou commandLink

Tu importa a lib:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

Não sei se você está usando template, mais seu conteúdo tem estar dentro das tag do JSF. <h:head> para o cabeçalho e <h:body> para seu conteúdo.

<?xml version="1.0" encoding="UTF-8" ?>
<!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:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>..::Título::..</title>
<h:outputStylesheet name="style.css" library="css" />
</h:head>
<h:body>

<h:form>
<p:remoteCommand name="lazyload" update="dt1">  
        <f:setPropertyActionListener value="#{true}" target="#{JAPListBean.listAP}" />  
</p:remoteCommand>  
</h:form>

</h:body>
</html>

Lembrando que <f:setPropertyActionListener /> pode ser usando dentro do <p:remoteCommand />
http://www.primefaces.org/showcase-labs/ui/remoteCommand.jsf

Pensei que não podia colocar dentro do p:remoteCommand

Eu gosto de usar <p:remoteCommand /> para manipular mensagens do <p:growl>, para quando clicar para submeter o formulário não aparecer aquele tanto de mensagens de validação require,
e sim somente o a mensagem de salvo com sucesso ou não.