0

I used JSF 2.2 with Primefaces 4.1, the added component in XHTML are not displayed:

I do the following configuration to integrate PrimeFaces:

  1. Add external jar in eclipse: primefaces-4.1-20131002.200838-1.jar
  2. I could see a new tab in Palette: see palette, that means component is integrated

  3. I add xmlns:p="http://primefaces.org/ui"> in my xhtml file

  4. I add primeface component please see below image


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!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:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui">
<h:body>
<div style="width:100%;font-size:36px;line-height:48px;background-color:navy;color:white">My Facelet Application</div>
<h:form>          
<!-- global messages -->     
<p:messages/>
<!-- or default JSF messages
<h:messages/  -->

               <p:panel header="Informationen">

                     <h:outputText value="Name:" /> 
                     <p:inputText id="persons" value="Aq"/>                        
               </p:panel>               
           </h:form>
</h:body>
</html>

The primeface component are not displayed, only normal component is displayed (I added this component because I need a calendar which is not default available in JSF): Component are not displayed when run application

  • If the pallet is visible it does NOT mean it is included in a deployed webapp! Check that, check the client-side source – Kukeltje May 31 '20 at 12:56
  • Can you take a look at [this](https://stackoverflow.com/questions/18940644/one-or-more-resources-has-the-target-of-head-but-not-head-component-has-been)? – WoAiNii May 31 '20 at 18:58

0 Answers0